You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OSSubprocess' process reaping logic reaps all child processes, not only those that it has spawned (that is, processes spawned by means of OSSubprocess). Therefore is may happen (does happen) that it does reap processes spawned by some other means (for example, manual calls to posix_spawn()) making OSSubprocess essentially incompatible (unusable) with any code that spawns processes.
I'd argue the code should be changed to only reap processes it has spawned - that's not a big deal as it keeps track of spawned processes anyways. So instead of waitpid(-1,...) call waitpid() for each process (it has spawned).
While at it, it is not necessary to have reaper process running when there are no outstanding live child processes.
The text was updated successfully, but these errors were encountered:
janvrany
added a commit
to janvrany/pharo-hacks
that referenced
this issue
Aug 22, 2023
...rather than Mariano's `OSSubprocess` package. The problem is that
`OSSubProcess` reaping logic assumes that all processes are spawned by
it so it may (does) reap processes spawned by LibUnix.
This commit makes `OSProcess` compatibility class to use `LibUnix`
to avoid this problem and throw an error is OSSubProcess is loaded.
A proper fix would be to change `OSSubprocess` to only reap processes
it has spawned (see [1])
[1] pharo-contributions/OSSubprocess#76
OSSubprocess' process reaping logic reaps all child processes, not only those that it has spawned (that is, processes spawned by means of OSSubprocess). Therefore is may happen (does happen) that it does reap processes spawned by some other means (for example, manual calls to
posix_spawn()
) making OSSubprocess essentially incompatible (unusable) with any code that spawns processes.I'd argue the code should be changed to only reap processes it has spawned - that's not a big deal as it keeps track of spawned processes anyways. So instead of
waitpid(-1,...)
callwaitpid()
for each process (it has spawned).While at it, it is not necessary to have reaper process running when there are no outstanding live child processes.
The text was updated successfully, but these errors were encountered: