m4-patches
[Top][All Lists]
Advanced

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

Re: bugs when operating with closed file descriptors


From: Eric Blake
Subject: Re: bugs when operating with closed file descriptors
Date: Tue, 25 Jul 2006 06:43:35 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 7/24/2006 1:59 PM:
> After some hacking in gnulib to provide the necessary hooks for m4's use,

And of course, gnulib has changed again.  Paul split stdio-safer into
fopen-safer and tmpfile-safer, with the argument that tmpfile is often not
safe in the presence of signals (and certainly not safe if combined with
the closeout module).  For branch-1_4, it is too invasive to change our
existing use of tmpfile.  But for CVS head, Bruno has added clean-temp,
which looks like a nicer way to get temporary files in a signal-safe manner.

2006-07-25  Eric Blake  <address@hidden>

        * m4/gnulib-cache.m4: Update to reflect gnulib's split of
        stdio-safer into fopen-safer and tmpfile-safer.
        * src/m4.c: Remove redundant include.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFExhH284KuGfSFAYARAukiAJ9sbR1jniA1QMwAIA6BYoOR9Ax41ACgmURG
bf9QZQlAXuupxGWsCpbjOns=
=Ht2b
-----END PGP SIGNATURE-----
Index: m4/gnulib-cache.m4
===================================================================
RCS file: /sources/m4/m4/m4/Attic/gnulib-cache.m4,v
retrieving revision 1.1.2.8
diff -u -p -r1.1.2.8 gnulib-cache.m4
--- m4/gnulib-cache.m4  24 Jul 2006 20:02:16 -0000      1.1.2.8
+++ m4/gnulib-cache.m4  25 Jul 2006 12:36:48 -0000
@@ -15,10 +15,10 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libm4 --source-base=lib --m4-base=m4 
--doc-base=doc --aux-dir=. --macro-prefix=M4 --assume-autoconf=2.60 alloca 
binary-io close-stream error fdl gendocs getopt mkstemp obstack regex 
stdio-safer stdlib-safer strtol unlocked-io xalloc xvasprintf
+#   gnulib-tool --import --dir=. --lib=libm4 --source-base=lib --m4-base=m4 
--doc-base=doc --aux-dir=. --macro-prefix=M4 --assume-autoconf=2.60 alloca 
binary-io close-stream error fdl fopen-safer gendocs getopt mkstemp obstack 
regex stdlib-safer strtol tmpfile-safer unlocked-io xalloc xvasprintf
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
-gl_MODULES([alloca binary-io close-stream error fdl gendocs getopt mkstemp 
obstack regex stdio-safer stdlib-safer strtol unlocked-io xalloc xvasprintf])
+gl_MODULES([alloca binary-io close-stream error fdl fopen-safer gendocs getopt 
mkstemp obstack regex stdlib-safer strtol tmpfile-safer unlocked-io xalloc 
xvasprintf])
 gl_AVOID([])
 gl_SOURCE_BASE([lib])
 gl_M4_BASE([m4])
Index: src/m4.c
===================================================================
RCS file: /sources/m4/m4/src/Attic/m4.c,v
retrieving revision 1.1.1.1.2.20
diff -u -p -r1.1.1.1.2.20 m4.c
--- src/m4.c    24 Jul 2006 20:02:16 -0000      1.1.1.1.2.20
+++ src/m4.c    25 Jul 2006 12:36:48 -0000
@@ -24,8 +24,6 @@
 #include <getopt.h>
 #include <signal.h>
 
-#include "close-stream.h"
-
 static void usage (int);
 
 /* Operate interactively (-e).  */
@@ -299,7 +297,7 @@ main (int argc, char *const *argv, char 
   head = tail = NULL;
 
   while (optchar = getopt_long (argc, (char **) argv, OPTSTRING,
-                                long_options, NULL),
+                               long_options, NULL),
         optchar != EOF)
     switch (optchar)
       {

reply via email to

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