From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Implement open-process and related functions on MinGW Date: Sun, 23 Feb 2014 05:45:02 +0200 Message-ID: <8361o63329.fsf@gnu.org> References: <834n3x8o7m.fsf@gnu.org> <83y519788a.fsf@gnu.org> <871tz0d5vc.fsf@gnu.org> <83iosc76kz.fsf@gnu.org> <87vbwc72dp.fsf_-_@gnu.org> <8361o74e0k.fsf@gnu.org> <87zjljjg7r.fsf@yeeloong.lan> <83eh2v2em9.fsf@gnu.org> <87mwhikdqc.fsf@yeeloong.lan> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1393127134 17944 80.91.229.3 (23 Feb 2014 03:45:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 23 Feb 2014 03:45:34 +0000 (UTC) Cc: ludo@gnu.org, guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Feb 23 04:45:38 2014 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WHQ0X-0000iP-Qp for guile-devel@m.gmane.org; Sun, 23 Feb 2014 04:45:37 +0100 Original-Received: from localhost ([::1]:51668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHQ0X-0005fw-5v for guile-devel@m.gmane.org; Sat, 22 Feb 2014 22:45:37 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHQ0M-0005fU-4k for guile-devel@gnu.org; Sat, 22 Feb 2014 22:45:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHQ0E-0002e3-9Y for guile-devel@gnu.org; Sat, 22 Feb 2014 22:45:26 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:58993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHQ0E-0002dw-1B; Sat, 22 Feb 2014 22:45:18 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0N1F00H00ISQP300@a-mtaout23.012.net.il>; Sun, 23 Feb 2014 05:45:16 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N1F00HA4JRFN540@a-mtaout23.012.net.il>; Sun, 23 Feb 2014 05:45:16 +0200 (IST) In-reply-to: <87mwhikdqc.fsf@yeeloong.lan> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.175 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16921 Archived-At: > From: Mark H Weaver > Cc: ludo@gnu.org, guile-devel@gnu.org > Date: Sat, 22 Feb 2014 17:02:35 -0500 >=20 > Eli Zaretskii writes: >=20 > >> From: Mark H Weaver > >> Cc: ludo@gnu.org (Ludovic Court=C3=A8s), guile-devel@gnu.org > >> Date: Sat, 22 Feb 2014 10:54:16 -0500 > >>=20 > >> Thanks for working on this, but in a multithreaded program, it's= no good > >> to change the file descriptors in the main program temporarily b= efore > >> spawning, and then restore them afterwards. We'll have to find = another > >> way of doing this. > > > > Btw, how does the Posix build work reliably when it forks after > > several threads are already running? I don't see any calls to > > pthread_atfork or any similar machinery in place. What am I miss= ing? >=20 > It's safe to fork a multithreaded program without using pthread_atf= ork > if only async-signal-safe functions are called before the exec. You may know what your code does between fork and exec, but you don't know what other parts do, like pthreads or the application that calle= d Guile as a library.