>>>>> Ben Collins writes:

Ben> On Fri, Apr 16, 1999 at 06:52:34PM +0200, Andreas Jaeger wrote:
>> > There were a few differences: They have nothing resembling our
>> > sigaction, and sigstack patches (are they still needed?)  They have an
>> > additional "libio-vfork" patch, which may fix our problems with
>> > non-cvs kernels (I'm not sure, but I've attached it so you can look at
>> > it).  Another difference is that RH is using glibc-990329.tar.gz as a
>> > base and we are using glibc-19990406.tar.gz.
>> 
>> The vfork patch is superseded by:
>> 1999-03-29  Paul Eggert  <[EMAIL PROTECTED]>
>> 
>> * libio/iopopen.c (_IO_new_proc_open): Don't modify proc_file_chain
>> while in child process.
>> 
>> which should be in 2.1.1-0.2.

Ben> This does not show in the ChangeLog for 2.1.1-0.2.

The patch went in the same day and therefore it should be in 2.1.1-0.2
(looking at the dates).  Nevertheless, I'm appending the patch so that
you can check yourself.

Andreas

Index: libio/iopopen.c
===================================================================
--- libio/iopopen.c     1998/11/23 09:31:38     1.16
+++ libio/iopopen.c     1999/03/29 16:01:58     1.17
@@ -139,6 +139,8 @@
   if (child_pid == 0)
     {
       int child_std_end = mode[0] == 'r' ? 1 : 0;
+      struct _IO_proc_file *p;
+
       _IO_close (parent_end);
       if (child_end != child_std_end)
        {
@@ -148,11 +150,8 @@
       /* POSIX.2:  "popen() shall ensure that any streams from previous
          popen() calls that remain open in the parent process are closed
         in the new child process." */
-      while (proc_file_chain)
-       {
-         _IO_close (_IO_fileno ((_IO_FILE *) proc_file_chain));
-         proc_file_chain = proc_file_chain->next;
-       }
+      for (p = proc_file_chain; p; p = p->next)
+       _IO_close (_IO_fileno ((_IO_FILE *) p));
 
       _IO_execl ("/bin/sh", "sh", "-c", command, (char *) 0);
       _IO__exit (127);

-- 
 Andreas Jaeger   [EMAIL PROTECTED]    [EMAIL PROTECTED]
  for pgp-key finger [EMAIL PROTECTED]

Reply via email to