From: Paul Eggert Date: Fri, 18 Apr 2014 06:40:15 +0000 (-0700) Subject: * emacs.c (close_output_streams): Don't clear and restore errno. X-Git-Tag: emacs-24.3.91~130 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=31559517374afc6373d228cfa1f2f115977c3b8b;p=emacs.git * emacs.c (close_output_streams): Don't clear and restore errno. --- diff --git a/src/ChangeLog b/src/ChangeLog index bb3b87cfcf6..deb1a0caf43 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-04-18 Paul Eggert + + * emacs.c (close_output_streams): Don't clear and restore errno. + 2014-04-17 Jan Djärv * xterm.c (x_make_frame_visible): Prevent endless loop when frame diff --git a/src/emacs.c b/src/emacs.c index 6a86dea9927..fd93324de97 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -686,11 +686,6 @@ void (*__malloc_initialize_hook) (void) EXTERNALLY_VISIBLE = malloc_initialize_h static void close_output_streams (void) { - int err = errno; - - /* close_stream checks errno, so make sure it doesn't inherit some - random value. */ - errno = 0; if (close_stream (stdout) != 0) { emacs_perror ("Write error to standard output"); @@ -699,8 +694,6 @@ close_output_streams (void) if (close_stream (stderr) != 0) _exit (EXIT_FAILURE); - - errno = err; } /* ARGSUSED */