in reply to Re^7: Proposal how to make modules using fork more portable
in thread Proposal how to make modules using fork more portable
I would attribute the missing resource cleanup of a pseudo-process-thread to how forked processes are implemented on Windows.
The missing clean-up only happens if the pseudo-process is forceably terminated. And that only becomes a necessary option if the application design assumes that it should be able to interrupt an IO-blocked process with a signal. Which it cannot.
I would hope that an OS cleans up all resources held by a terminated process.
From what I've picked up through osmosis rather than through any practical experience, there are various things that will survive an interrupted process under some or all variants of *nix. File-locks on NFS filesystems; SysV memory, mutexes and semaphores; named pipes. I also vaguely recall something about listening ports (I can't remember if these were unix or inet domain ports) that remained open after the process that created them died until they time out. Typically 15 minutes?
Windows has its own fair share of system resources that can remain in use beyond the process that created them if they are not explicitly cleaned up. Almost any named system object--pipe, semaphore, mutex etc.--will, by design, persist until explicitly closed, or re-boot.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Proposal how to make modules using fork more portable
by Corion (Patriarch) on Apr 01, 2011 at 22:53 UTC | |
by BrowserUk (Patriarch) on Apr 02, 2011 at 12:27 UTC |