1155 in.ftpd sometimes starts with SIGALRM blocked
authorGary Mills <mills@cc.umanitoba.ca>
Fri, 12 Aug 2011 16:07:25 -0400
changeset 13428 a9dfa4813bcd
parent 13427 2b3b7ee313ef
child 13429 b2fbfacb9f9c
1155 in.ftpd sometimes starts with SIGALRM blocked Reviewed by: Richard Lowe <[email protected]> Reviewed by: Garrett D'Amore <[email protected]> Reviewed by: Eric Schrock <[email protected]> Reviewed by: Gordon Ross <[email protected]> Approved by: Albert Lee <[email protected]>
usr/src/cmd/cmd-inet/usr.lib/inetd/inetd.c
--- a/usr/src/cmd/cmd-inet/usr.lib/inetd/inetd.c	Thu Aug 11 16:47:55 2011 -0700
+++ b/usr/src/cmd/cmd-inet/usr.lib/inetd/inetd.c	Fri Aug 12 16:07:25 2011 -0400
@@ -19,6 +19,8 @@
  * CDDL HEADER END
  */
 /*
+ * Copyright (c) 2011 Gary Mills
+ *
  * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
@@ -2695,6 +2697,7 @@
 	char 		**env;
 	const char	*errf;
 	int		serrno;
+	sigset_t	mtset;
 	basic_cfg_t	*cfg = instance->config->basic;
 
 	if (method == IM_START) {
@@ -2715,6 +2718,12 @@
 	(void) sigset(SIGINT, SIG_DFL);
 
 	/*
+	 * Ensure that other signals are unblocked
+	 */
+	(void) sigemptyset(&mtset);
+	(void) sigprocmask(SIG_SETMASK, &mtset, (sigset_t *)NULL);
+
+	/*
 	 * Setup exec arguments. Do this before the fd setup below, so our
 	 * logging related file fd doesn't get taken over before we call
 	 * expand_address().