* solaris 2.2 & rshd & rc
@ 1994-03-29 2:29 Scott Merrilees
1994-03-29 2:54 ` noel
0 siblings, 1 reply; 3+ messages in thread
From: Scott Merrilees @ 1994-03-29 2:29 UTC (permalink / raw)
To: The rc Mailing List
When doing a rsh command to a solaris 2.2 box, I find that the rc
started by rshd hangs in a cpu loop after the command has terminated.
Interestingly, SIGCLD is ingored in both rshd & rc. Has anyone else
fixed this problem ?
Sm
--
Scott Merrilees, BHP Information Technology, Newcastle, Australia
Internet: Sm@bhpese.oz.au Phone: +61 49 40 1687 Fax: ... 2165
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: solaris 2.2 & rshd & rc
1994-03-29 2:29 solaris 2.2 & rshd & rc Scott Merrilees
@ 1994-03-29 2:54 ` noel
1994-03-29 3:13 ` Scott Merrilees
0 siblings, 1 reply; 3+ messages in thread
From: noel @ 1994-03-29 2:54 UTC (permalink / raw)
To: Scott Merrilees, The rc Mailing List
From: Scott Merrilees <Sm@cerberus.bhpese.oz.au>
Subject: solaris 2.2 & rshd & rc
When doing a rsh command to a solaris 2.2 box, I find that the rc
started by rshd hangs in a cpu loop after the command has terminated.
Interestingly, SIGCLD is ingored in both rshd & rc. Has anyone else
fixed this problem ?
it's not that rc _ignores_ SIGCLD, it just doesn't touch it. when rc
is started by login and forks a program, you will notice that SIGCLD
is SIG_DFL. but when rc is started by rshd, it must be set to SIG_IGN.
bad shit happens in sysvr4 when this is done, namely, a parent is not
notified of the death of a child, so rc just sits in that wait loop
waiting to pick up the status of the child it just forked, a status
it will never get. i noticed the cpu in a tight loop when this happened.
anyway, i just hacked the code to make sure SIGCLD is _always_ SIG_DFL.
this seems to fix the problem.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: solaris 2.2 & rshd & rc
1994-03-29 2:54 ` noel
@ 1994-03-29 3:13 ` Scott Merrilees
0 siblings, 0 replies; 3+ messages in thread
From: Scott Merrilees @ 1994-03-29 3:13 UTC (permalink / raw)
To: noel; +Cc: The rc Mailing List
From: Scott Merrilees <Sm@cerberus.bhpese.oz.au>
When doing a rsh command to a solaris 2.2 box, I find that the rc
started by rshd hangs in a cpu loop after the command has terminated.
Interestingly, SIGCLD is ingored in both rshd & rc. Has anyone else
fixed this problem ?
>From: noel@es.su.oz.au
>it's not that rc _ignores_ SIGCLD, it just doesn't touch it. when rc
>is started by login and forks a program, you will notice that SIGCLD
>is SIG_DFL. but when rc is started by rshd, it must be set to SIG_IGN.
>bad shit happens in sysvr4 when this is done, namely, a parent is not
>notified of the death of a child, so rc just sits in that wait loop
>waiting to pick up the status of the child it just forked, a status
>it will never get. i noticed the cpu in a tight loop when this happened.
>
>anyway, i just hacked the code to make sure SIGCLD is _always_ SIG_DFL.
>this seems to fix the problem.
That was my guess, I figure that rshd must be doing a process id
specific wait, such as waitpid(), and doesn't want to get hit with
SIGCLD signals.
After looking in fn.c:setsigdefaults(), I came up with the following
patch to fn.c:inithandlers(). This seems to work. The patch is
relative to rc-1.4.
Sm
--
*** fn.c.orig Tue Mar 29 12:37:04 1994
--- fn.c Tue Mar 29 12:39:16 1994
***************
*** 45,50 ****
--- 45,54 ----
fnrm("sigterm"); /* ditto for SIGTERM */
}
}
+ #ifdef NOSIGCLD
+ rc_signal(SIGCLD, SIG_DFL);
+ delete_fn(signals[SIGCLD].name);
+ #endif
}
/* only run this in a child process! resets signals to their default values */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1994-03-29 3:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-03-29 2:29 solaris 2.2 & rshd & rc Scott Merrilees
1994-03-29 2:54 ` noel
1994-03-29 3:13 ` Scott Merrilees
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).