From fac5405ad691b9524618a81296fd81153bf20e9d Mon Sep 17 00:00:00 2001 From: ray Date: Mon, 26 Mar 2007 05:39:51 +0000 Subject: Restore errno before calling perror(). --- usr.bin/sendbug/sendbug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'usr.bin/sendbug/sendbug.c') 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 . @@ -189,6 +189,7 @@ editit(char *tmpfile) sleep(1); goto top; } + errno = saved_errno; perror("fork"); free(p); return (-1); -- cgit v1.2.3-59-g8ed1b