Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/cron Pull up revision 1.7 (requested by christ...
details: https://anonhg.NetBSD.org/src/rev/78ce01052ac3
branches: netbsd-1-5
changeset: 491877:78ce01052ac3
user: he <he%NetBSD.org@localhost>
date: Sun Jun 10 19:08:12 2001 +0000
description:
Pull up revision 1.7 (requested by christos):
Restore default handler for SIG_CHLD before starting grand-children.
Fixes problem with e.g. Perl scripts run from cron. Fixes PR#11778.
diffstat:
usr.sbin/cron/do_command.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 21c3ed7418a4 -r 78ce01052ac3 usr.sbin/cron/do_command.c
--- a/usr.sbin/cron/do_command.c Sun Jun 10 18:56:03 2001 +0000
+++ b/usr.sbin/cron/do_command.c Sun Jun 10 19:08:12 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: do_command.c,v 1.6 1998/07/06 06:57:18 mrg Exp $ */
+/* $NetBSD: do_command.c,v 1.6.10.1 2001/06/10 19:08:12 he Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -22,7 +22,7 @@
#if 0
static char rcsid[] = "Id: do_command.c,v 2.12 1994/01/15 20:43:43 vixie Exp ";
#else
-__RCSID("$NetBSD: do_command.c,v 1.6 1998/07/06 06:57:18 mrg Exp $");
+__RCSID("$NetBSD: do_command.c,v 1.6.10.1 2001/06/10 19:08:12 he Exp $");
#endif
#endif
@@ -225,6 +225,15 @@
setuid(e->uid); /* we aren't root after this... */
chdir(env_get("HOME", e->envp));
+#ifdef USE_SIGCHLD
+ /* our grandparent is watching for our death by catching
+ * SIGCHLD. the parent is ignoring SIGCHLD's; we want
+ * to restore default behaviour.
+ */
+ (void) signal(SIGCHLD, SIG_DFL);
+#endif
+ (void) signal(SIGHUP, SIG_DFL);
+
/* exec the command.
*/
{
Home |
Main Index |
Thread Index |
Old Index