Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <36895.193.16.155.145.1105449682.squirrel@193.16.155.145> In-Reply-To: <20050111121830.GA1128@tishler.net> References: <20050105100830 DOT GB5240 AT cygbert DOT vinschen DOT de> <30305 DOT 193 DOT 16 DOT 155 DOT 145 DOT 1104926914 DOT squirrel AT 193 DOT 16 DOT 155 DOT 145> <20050105124336 DOT GA6515 AT cygbert DOT vinschen DOT de> <20050105150204 DOT GA1068 AT tishler DOT net> <20050111121830 DOT GA1128 AT tishler DOT net> Date: Tue, 11 Jan 2005 14:21:22 +0100 (CET) Subject: Re: popen() fails while system() works From: "Rainer Hochreiter" To: cygwin AT cygwin DOT com User-Agent: SquirrelMail/1.4.3a-0.f0.9.1.legacy MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes > On Mon, Jan 10, 2005 at 08:56:58AM +0100, Rainer Hochreiter wrote: >> but what's the real reason why popen() results in the address conflict >> and system() does not?! > > AFAICT, popen() calls fork() and system() does not. this is not true - both functions call vfork()! cygwin-1.5.12-1/newlib/libc/stdlib/system.c:165 if ((pid = vfork ()) == 0) cygwin-1.5.12-1/newlib/libc/posix/popen.c:92 switch (pid = vfork()) { system() calls execve() while popen() calls execl() to start execution of another file! -- rainer hochreiter | web: www.hochreiter.at lilienfelder str. 43 | e-mail: rainer AT hochreiter DOT at a-3150 wilhelmsburg / austria | mobile: +43 664 2812175 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/