]> code.delx.au - gnu-emacs/blobdiff - src/unexaix.c
Don't ignore SIGPROF in subprocesses
[gnu-emacs] / src / unexaix.c
index 45b3ca667b081fc7c79431171498e7b00a45e717..c08d192b32cef5bf9e8ceaabff3c2bedd9eaae1f 100644 (file)
@@ -1,5 +1,5 @@
 /* Dump an executable image.
-   Copyright (C) 1985-1988, 1999, 2001-2013 Free Software Foundation,
+   Copyright (C) 1985-1988, 1999, 2001-2014 Free Software Foundation,
    Inc.
 
 This file is part of GNU Emacs.
@@ -94,13 +94,10 @@ static int pagemask;
 static _Noreturn void
 report_error (const char *file, int fd)
 {
+  int err = errno;
   if (fd)
-    {
-      int failed_errno = errno;
-      emacs_close (fd);
-      errno = failed_errno;
-    }
-  report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil));
+    emacs_close (fd);
+  report_file_errno ("Cannot unexec", build_string (file), err);
 }
 
 #define ERROR0(msg) report_error_1 (new, msg)