bug-m4
[Top][All Lists]
Advanced

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

Frozen state generation fails with returncode 0


From: Jean-Charles Longuet
Subject: Frozen state generation fails with returncode 0
Date: Wed, 21 May 2008 22:10:31 +0200
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)


When m4 fails to open() the frozen state file, it complains
but the process exit code is still 0. However, the same function
may trigger failures leading to a non-zero process exit code,
for example when the close() of the frozen state file fails.

Wouldn't it be consistent to also exit on open() failures,
with this one-line patch or equivalent ?


--- src/freeze.c.ORIG   Wed May 21 18:09:29 2008
+++ src/freeze.c        Wed May 21 18:18:22 2008
@@ -59,7 +59,7 @@
   if (file = fopen (name, O_BINARY ? "wb" : "w"), !file)
     {
       M4ERROR ((warning_status, errno, "%s", name));
-      return;
+      abort ();
     }

   /* Write a recognizable header.  */

--
 Jean-Charles Longuet




reply via email to

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