Discussion:
[ast-developers] Issue with signals being sent to recycled process ids
lijo george
2015-02-15 22:50:16 UTC
Permalink
There seems to be an issue of ksh forwarding signals to recycled process
ids.
This was reported by a customer while running some script but looks like
the same can be reproduced with the following
steps.

1. ssh into a test machine.
2. Run some background job.
for eg. sleep 10 &
Note the process id.

3. In another terminal, create a process with the process id observed in
step 2.
The attached C file can be used for this.
Run as ./cpid process-id.

4. Forcibly disconnect the ssh connection in terminal 1 by
entering ~.

We'll observe that the process created in step 3 is killed. Looks like ksh
forwards the SIGHUP to the recycled pid.

I've tested this in the 2011-02-08, 2012-08-01 and the latest 2014 version
on Solaris env.
This is also observed in Ubuntu 14(ksh2012-08-01).

I'm currently going through the job control code to figure out why this is
happening.
But as I'm quite new to the code, it might take me a while to figure
something out.

If someone has observed this earlier/investigated this, please let me know.
Loading...