Date: Thu, 7 Jul 2005 02:13:43 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Dipjyoti Saikia <dipjyoti.saikia@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: thread-safe popen Message-ID: <20050707071343.GD38925@dan.emsphone.com> In-Reply-To: <dcbc809d050706224410fff9c4@mail.gmail.com> References: <dcbc809d05070503454a259f88@mail.gmail.com> <20050705143814.GA38925@dan.emsphone.com> <dcbc809d050706224410fff9c4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jul 07), Dipjyoti Saikia said: > On 7/5/05, Dan Nelson <dnelson@allantgroup.com> wrote: > > In the last episode (Jul 05), Dipjyoti Saikia said: > > > I am working on an OS derived for BSD 4.1 . I am trying to > > > backport a thread-safe version of popen() from BSD 4.10 . > > > > popen should be threadsafe as of rev 1.17 (2003-01-03) of > > /usr/src/lib/libc/gen/popen.c . It was merged into the 4.* branch in > > rev 1.14.2.1 (2004/12/15). The PR is bin/50770 . Do you have a > > testcase that causes it to fail? > Please find the code snippet of popen() from the source code that I > have (We are working on an OS that is derived from FreeBSD 4.1) . I > don't think I have the thread safe version . Correct; you need to look at the 4.11 source. 4.10's popen wasn't thread-safe. This link will get you the diffs between 4.1 and 4.11 which will make popen thread-safe: http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/gen/popen.c.diff?r1=RELENG_4_1_0_RELEASE&r2=RELENG_4_11_0_RELEASE -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050707071343.GD38925>