bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gawk 3.1.0 can mark fd 0 for close on exec


From: Aharon Robbins
Subject: gawk 3.1.0 can mark fd 0 for close on exec
Date: Tue, 25 Sep 2001 15:25:26 +0200

It turns out that gawk 3.1.0 can mark fd 0 as close-on-exec.  This is
a bug.  Thanks to a poster on comp.lang.awk for pointing this out.
Patch below.

Again, I remind everyone that if you see strange behavior in gawk,
in particular if something worked one way in gawk 3.0.6 and works
differently in 3.1.0, the right place to ask is address@hidden
Posting in comp.lang.awk IS THE WRONG PLACE.

Thanks,

Arnold Robbins

----------------- Unofficial Patch ---------------------------
*** ../gawk-3.1.0/io.c  Tue Apr 24 14:35:35 2001
--- io.c        Tue Sep 25 15:15:36 2001
***************
*** 1445,1451 ****
                if (os_isdir(openfd))
                        fatal(_("file `%s' is a directory"), name);
  
!               os_close_on_exec(openfd, name, "file", "");
        }
        return iop_alloc(openfd, name, iop);
  }
--- 1445,1452 ----
                if (os_isdir(openfd))
                        fatal(_("file `%s' is a directory"), name);
  
!               if (openfd > fileno(stderr))
!                       os_close_on_exec(openfd, name, "file", "");
        }
        return iop_alloc(openfd, name, iop);
  }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]