Date: Wed, 12 Jan 2011 16:16:55 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r217312 - head/sbin/hastd Message-ID: <201101121616.p0CGGtwM094632@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Wed Jan 12 16:16:54 2011 New Revision: 217312 URL: http://svn.freebsd.org/changeset/base/217312 Log: execve(2), not fork(2) resets signal handler to the default value (if it isn't ignored). Correct comment talking about that. Pointed out by: kib MFC after: 3 days Modified: head/sbin/hastd/hooks.c Modified: head/sbin/hastd/hooks.c ============================================================================== --- head/sbin/hastd/hooks.c Wed Jan 12 16:00:49 2011 (r217311) +++ head/sbin/hastd/hooks.c Wed Jan 12 16:16:54 2011 (r217312) @@ -373,9 +373,9 @@ hook_execv(const char *path, va_list ap) PJDLOG_VERIFY(sigemptyset(&mask) == 0); PJDLOG_VERIFY(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); /* - * Dummy handler set for SIGCHLD in the parent should be - * changed after fork(2) automatically to the default SIG_IGN, - * so there is no need to do anything with it. + * Dummy handler set for SIGCHLD in the parent will be restored + * to SIG_IGN on execv(3) below, so there is no need to do + * anything with it. */ execv(path, args); pjdlog_errno(LOG_ERR, "Unable to execute %s", path);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101121616.p0CGGtwM094632>