gap-packages / io

GAP package IO to do input and output
https://gap-packages.github.io/io/
Other
14 stars 14 forks source link

Checking IO's signal handler is installed #57

Closed ChrisJefferson closed 6 years ago

ChrisJefferson commented 6 years ago

Various functions in IO, like IO_fork, require IO's signal handler is installed. At the moment, we don't check if the signal handler is installed and if it is not, then later function calls to IO_waitpid fail, as GAP has already swallowed the child.

I can think of 3(ish) reasonable solutions to this:

1) Make functions like IO_fork fail if IO's signal handler is not installed. 2) Install IO's signal handler whenever we run a function which requires. 3) Install IO's signal handler on package loading. 3b) And make IO_InstallSIGCHLDHandler and IO_RestoreSIGCHLDHandler into no-op functions, and remove the ability to control the signal handler at all.

ChrisJefferson commented 6 years ago

I am tempted to go hard-core, and do (3b), which should make the experience for users much simpler.

However I am interested if anyone, in particular @markuspf , @stevelinton or @fingolfin have any opinion.

fingolfin commented 6 years ago

This has been essentially resolved by PR #59.