summaryrefslogtreecommitdiffstats
path: root/bin/dd
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1997-10-08 12:59:14 +0000
committereivind <eivind@FreeBSD.org>1997-10-08 12:59:14 +0000
commita63bff464b378362cad67f15e0d3f291f82375d6 (patch)
tree39c2dab0c35e30c566fc24469ac8de3bbc42e4b7 /bin/dd
parent8e86c4888aca6a08bb5b8080950f7b9772d72cdb (diff)
downloadFreeBSD-src-a63bff464b378362cad67f15e0d3f291f82375d6.zip
FreeBSD-src-a63bff464b378362cad67f15e0d3f291f82375d6.tar.gz
make signal handlers errno safe
Obtained from: OpenBSD (file rev 1.5) Theo de Raadt <deraadt@openbsd.org>
Diffstat (limited to 'bin/dd')
-rw-r--r--bin/dd/misc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/dd/misc.c b/bin/dd/misc.c
index 394f593..2a8891b 100644
--- a/bin/dd/misc.c
+++ b/bin/dd/misc.c
@@ -34,7 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: misc.c,v 1.7 1997/02/22 14:02:47 peter Exp $
*/
#ifndef lint
@@ -91,8 +91,10 @@ void
summaryx(notused)
int notused;
{
+ int save_errno = errno;
summary();
+ errno = save_errno;
}
/* ARGSUSED */
OpenPOWER on IntegriCloud