diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-02-01T12·00+0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-02-01T12·00+0100 |
commit | 7a65b2470eb53a320749d76746fbf65790183d9d (patch) | |
tree | 696a327d3a17a676d9ab9b723e8abcd7a7cef3ed /src/libutil/util.hh | |
parent | 583ff4ec46fe1fa758f0fa4df1d8b37d9192736c (diff) |
Restore default signal handling in child processes
In particular, this fixes Ctrl-C in nix-shell sessions.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 07141ffed6b5..cfaaf1486e9e 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -256,10 +256,6 @@ void closeMostFDs(const set<int> & exceptions); /* Set the close-on-exec flag for the given file descriptor. */ void closeOnExec(int fd); -/* Restore default handling of SIGPIPE, otherwise some programs will - randomly say "Broken pipe". */ -void restoreSIGPIPE(); - /* User interruption. */ @@ -423,6 +419,9 @@ void callSuccess( on the current thread (and thus any threads created by it). */ void startSignalHandlerThread(); +/* Restore default signal handling. */ +void restoreSignals(); + struct InterruptCallback { virtual ~InterruptCallback() { }; |