GREAT IDEA & IMPLEMENTATION !!!
I've been using it for a while , works really great .
I wonder if anyone has encountered the following issue:
My login-shell is not standard bash , it is a script that eventually calls the "/bin/sh" . something like this:
# do something else...
The problem is that if the session disconnects (probably SIGHUP) all the processes terminate EXCEPT the script (which is "dangling" in the loop) . I've found out that AFTER the system(), this is an orphan process owned by "init" (PID 1) .
it seems that the script that is inside the system() call simply ignores the signal.
I tried to add signal handling but it didn't help.
I had to solve it by checking the PPID before and after the system() and force exit if PPID has changed to "1"
Can anyone think of another solution ? or even better - can anyone explains why the signal is ignored ?