diff options
author | Jim Meyering <meyering@redhat.com> | 2011-05-24 15:51:51 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-05-25 16:47:33 +0200 |
commit | 0649fbf212224f757245263e5f3c90e423b21571 (patch) | |
tree | 6dd7f8f8a5dea13df2fead285a78118dacd6c4ce | |
parent | 209af7ee4b7d28a25b0fb33c7e017277291cfc2c (diff) | |
download | patch-0649fbf212224f757245263e5f3c90e423b21571.tar.gz |
emit one more diagnostic with the required "program_name: " prefix
* src/util.c: Include "error.h".
(ask): Use error, not perror. The latter would not have included
the usual "program name: " prefix.
-rw-r--r-- | src/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -30,6 +30,7 @@ #include <getdate.h> #include "ignore-value.h" +#include "error.h" #include <signal.h> #if !defined SIGCHLD && defined SIGCLD @@ -1006,8 +1007,7 @@ ask (char const *format, ...) printf ("EOF\n"); else if (r < 0) { - perror ("tty read"); - fflush (stderr); + error (0, errno, "tty read failed"); ignore_value (close (ttyfd)); ttyfd = -1; r = 0; |