1 Feb 2009 10:47
Re: setsid
Vladimir Tzankov <vtzankov <at> gmail.com>
2009-02-01 09:47:03 GMT
2009-02-01 09:47:03 GMT
On Jan 31, 2009, at 1:41 AM, Bruno Haible wrote: > Sam wrote: >> if you know what you are doing and are confident that setsid does >> not serve any >> useful purpose, you can remove the calls outright (with an extensive >> explanation in the changelog). >> otherwise, you could disable it just in MT builds. >> if you want to be extra careful, you can write an autoconf test to >> detect >> whether setsid can be used the way we do, and disable it if it >> cannot be. >> Bruno, can you comment on the matter? > > There are situations where you need it, and there are situations > where it > hurts to have SETSID() called in the freshly created subprocess. > Probably > I encountered a case where it was needed, years ago, and put in the > call, > so that things behaved "correctly" w.r.t. Ctrl-C and logout. Maybe > this case > was that when the user presses Ctrl-C, the user expects to stop > clisp's > execution, but without the SETSID() the system sends a SIGINT > signal to the > subprocess, thus killing it. (Because clisp's signal handler for > Ctrl-C has > no effect on the subprocess.)(Continue reading)
.
Yes the code using this will be unportable but it's Very Very convenient and intuitive.
RSS Feed