Red Hat Bugzilla – Bug 219137
kshd stops processes if these are in the background.
Last modified: 2007-11-16 20:14:54 EST
Description of problem:
Using kshd and requesting it to execute tasks in the background always fails
even if it announces a success. If we trap SIGTERM, then it gets executed normally.
This comes from the upstream change :
2003-08-29 Ken Raeburn <firstname.lastname@example.org>
* krshd.c (ignore_signals): Split out from cleanup().
(doit): Call it when the shell process has completed, before
Which did a split in cleanup, performing all the syslog calls on
ignore_signals() to avoid deadlocks on syslog as shown in the upstream post in
Now, the problem is that upstream forgot that this copy and paste on the split
was carrying a kill(-pid, SIGTERM); causing all the processes on this group to die.
Attached is a patch respecting their idea to split signal zone, allowing the
tasks to be executed in the background.
Version-Release number of selected component (if applicable):
krb5-server-1.3.4-33 and onwards.
Steps to Reproduce:
1. Setup a KDC and xinetd enabling kshell.
2. Setup access (ktab / user account).
3. Supposidly we are using "jmp" run then :
% /usr/kerberos/bin/rsh -n -l jmp -x kdc_host "sleep 60 < /dev/null
This task will be terminated.
However, if you run it with :
"trap \"\" TERM; sleep 60...........&"
It will work.
Failure even if kshd reports success.
Task executed in the background.
Patch attached fixing this small bug (UPSTREAM too).
Please let me know if you require more informations.
Created attachment 143289 [details]
Patch allowing a task to be executed in the background in kshd.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.