Restore default signal handling in child processes

In particular, this fixes Ctrl-C in nix-shell sessions.
This commit is contained in:
Eelco Dolstra 2017-02-01 13:00:21 +01:00
parent 583ff4ec46
commit 7a65b2470e
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
7 changed files with 33 additions and 35 deletions

View file

@ -91,6 +91,7 @@ ref<RemoteStore::Connection> SSHStore::openConnection()
{
if ((pid_t) sshMaster == -1) {
sshMaster = startProcess([&]() {
restoreSignals();
if (key.empty())
execlp("ssh", "ssh", "-N", "-M", "-S", socketPath.c_str(), uri.c_str(), NULL);
else