pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/add Pull over change from s...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eb71ad1772fe
branches: trunk
changeset: 497342:eb71ad1772fe
user: hubertf <hubertf%pkgsrc.org@localhost>
date: Mon Jul 25 13:13:00 2005 +0000
description:
Pull over change from src/usr.sbin/pkg_install:
| Modified Files:
| src/usr.sbin/pkg_install/add: perform.c
|
| Log Message:
| cleanup: preserve errno. Needed so err() functions ran after running
| cleanup(0) print the correct error message.
|
|
| To generate a diff of this commit:
| cvs rdiff -r1.109 -r1.110 src/usr.sbin/pkg_install/add/perform.c
diffstat:
pkgtools/pkg_install/files/add/perform.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diffs (50 lines):
diff -r 6b92bcd936a3 -r eb71ad1772fe pkgtools/pkg_install/files/add/perform.c
--- a/pkgtools/pkg_install/files/add/perform.c Mon Jul 25 13:08:33 2005 +0000
+++ b/pkgtools/pkg_install/files/add/perform.c Mon Jul 25 13:13:00 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.32 2005/07/18 09:14:04 hubertf Exp $ */
+/* $NetBSD: perform.c,v 1.33 2005/07/25 13:13:00 hubertf Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "from FreeBSD Id: perform.c,v 1.44 1997/10/13 15:03:46 jkh Exp";
#else
-__RCSID("$NetBSD: perform.c,v 1.32 2005/07/18 09:14:04 hubertf Exp $");
+__RCSID("$NetBSD: perform.c,v 1.33 2005/07/25 13:13:00 hubertf Exp $");
#endif
#endif
@@ -41,6 +41,9 @@
#if HAVE_ERR_H
#include <err.h>
#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
#include "lib.h"
#include "add.h"
#include "verify.h"
@@ -1013,8 +1016,11 @@
cleanup(int signo)
{
static int alreadyCleaning;
- void (*oldint) (int);
- void (*oldhup) (int);
+ void (*oldint) (int);
+ void (*oldhup) (int);
+ int saved_errno;
+
+ saved_errno = errno;
oldint = signal(SIGINT, SIG_IGN);
oldhup = signal(SIGHUP, SIG_IGN);
@@ -1030,6 +1036,7 @@
}
signal(SIGINT, oldint);
signal(SIGHUP, oldhup);
+ errno = saved_errno;
}
int
Home |
Main Index |
Thread Index |
Old Index