diff --git a/rmtfs.c b/rmtfs.c index 26c0488..25862d1 100644 --- a/rmtfs.c +++ b/rmtfs.c @@ -445,7 +445,10 @@ static int run_rmtfs(int rprocfd) rproc_start(); for (;;) { - if (rprocfd >= 0 && sig_int_count == 1 && !sig_int_handled) { + if (sig_int_count == 1 && !sig_int_handled) { + if (rprocfd < 0) + break; + rproc_stop(); sig_int_handled = true; } else if (sig_int_count > 1) {