[Info-vax] Orphaned processes on OpenVMS
Johnny Billquist
bqt at softjar.se
Thu May 19 21:42:42 EDT 2011
On 2011-05-19 16.47, Snowshoe wrote:
> On 5/19/2011 6:10 PM, Johnny Billquist wrote:
>> On 2011-05-19 14.53, Wendell wrote:
>>> One of my biggest aggravations with *nix is the persistence of
>>> orphaned processes. Say an app hangs. I log in to another virtual
>>> terminal and "kill" it. That leaves various, no longer needed
>>> processes still running, and the only way to really clean up is reboot
>>> the system. At the worst, these stragglers can interfere with
>>> restarting the app I had to kill.
>>
>> Huh? That's not exactly how it works. If you kill a process, all its
>> children are transferred to the init process. They might keep running,
>> though. But when they exit, init will reap them.
>> If you explicitly want the children killed too, then I guess you just
>> need to go through the process list, and kill them too.
>> (Sometimes you can send signals to a whole process group, which might do
>> what you want?)
>>
>>> I've heard it said that OpenVMS doesn't have this problem at all. How
>>> does it prevent orphans or at least allow cleanup without rebooting?
>>
>> VMS don't have the concept of a hierarchy of processes in the same way
>> Unix do. But you can kill processes in VMS, just as in Unix.
>
> VMS does have subprocesses, and when you kill a main process, its
> subprocesses WILL die. Subprocesses can have subprocesses as well.
Well, I didn't say it don't have subprocesses. I just said it don't have
a hierarchy in the same way as Unix do.
And that you can kill processes in either OS. :-)
> Exceptions are if a process goes into a mwait state or something,
> usually meaning a bug in a driver or something. In this case the main
> process won't go away (itself going into a mwait state) until if and
> when the subprocesses exit.
>
> You can also create detached processes on VMS. In this case there is no
> relationship between the creator and createe after creation. One dying
> doesn't affect the other.
Indeed. And that is different from Unix, where there is always a
relationship.
Johnny
More information about the Info-vax
mailing list