summaryrefslogtreecommitdiffstats
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/mycelium.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/mycelium.rs b/src/transport/mycelium.rs
index d31925d..0c816c5 100644
--- a/src/transport/mycelium.rs
+++ b/src/transport/mycelium.rs
@@ -280,6 +280,12 @@ impl SupervisedMycelium {
for &fd in &fds_to_inherit {
libc::fcntl(fd, libc::F_SETFD, 0);
}
+ // Own process group: a Ctrl-C in the terminal goes to continuum only,
+ // which then stops Mycelium itself, instead of both exiting at once (which
+ // shows up as "Mycelium runtime process exited").
+ if libc::setpgid(0, 0) != 0 {
+ return Err(std::io::Error::last_os_error());
+ }
#[cfg(target_os = "linux")]
{
if libc::prctl(libc::PR_SET_PDEATHSIG, libc::SIGTERM) != 0 {