From 7a65b2470eb53a320749d76746fbf65790183d9d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 1 Feb 2017 13:00:21 +0100 Subject: Restore default signal handling in child processes In particular, this fixes Ctrl-C in nix-shell sessions. --- src/libstore/build.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore/build.cc') diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 7fb5271f4a89..40927c063267 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -400,6 +400,8 @@ void Goal::trace(const format & f) /* Common initialisation performed in child processes. */ static void commonChildInit(Pipe & logPipe) { + restoreSignals(); + /* Put the child in a separate session (and thus a separate process group) so that it has no controlling terminal (meaning that e.g. ssh cannot open /dev/tty) and it doesn't receive @@ -2662,8 +2664,6 @@ void DerivationGoal::runChild() for (auto & i : drv->args) args.push_back(rewriteStrings(i, inputRewrites)); - restoreSIGPIPE(); - /* Indicate that we managed to set up the build environment. */ writeFull(STDERR_FILENO, string("\1\n")); -- cgit 1.4.1