forked from lix-project/lix
* Run the worker in a separate session to prevent terminal signals
from interfering.
This commit is contained in:
parent
e25fad691a
commit
714fa24cfb
|
@ -164,6 +164,12 @@ void run(Strings args)
|
|||
if (slave) {
|
||||
FdSource source(STDIN_FILENO);
|
||||
FdSink sink(STDOUT_FILENO);
|
||||
|
||||
/* This prevents us from receiving signals from the terminal
|
||||
when we're running in setuid mode. */
|
||||
if (setsid() == -1)
|
||||
throw SysError(format("creating a new session"));
|
||||
|
||||
processConnection(source, sink);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue