diff options
| author | 2007-03-26 05:39:51 +0000 | |
|---|---|---|
| committer | 2007-03-26 05:39:51 +0000 | |
| commit | fac5405ad691b9524618a81296fd81153bf20e9d (patch) | |
| tree | 964bd96408a054420ee34c51d8e4e43771658ef5 /usr.bin/sendbug/sendbug.c | |
| parent | Check fork() == -1 instead of fork() < 0. (diff) | |
| download | wireguard-openbsd-fac5405ad691b9524618a81296fd81153bf20e9d.tar.xz wireguard-openbsd-fac5405ad691b9524618a81296fd81153bf20e9d.zip | |
Restore errno before calling perror().
Diffstat (limited to 'usr.bin/sendbug/sendbug.c')
| -rw-r--r-- | usr.bin/sendbug/sendbug.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/sendbug/sendbug.c b/usr.bin/sendbug/sendbug.c index 7b0bf6516ae..6269c00113e 100644 --- a/usr.bin/sendbug/sendbug.c +++ b/usr.bin/sendbug/sendbug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.23 2007/03/26 05:34:30 ray Exp $ */ +/* $OpenBSD: sendbug.c,v 1.24 2007/03/26 05:39:51 ray Exp $ */ /* * Written by Ray Lai <ray@cyth.net>. @@ -189,6 +189,7 @@ editit(char *tmpfile) sleep(1); goto top; } + errno = saved_errno; perror("fork"); free(p); return (-1); |
