aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nnn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nnn.c b/nnn.c
index 49edbe6..da6e8cc 100644
--- a/nnn.c
+++ b/nnn.c
@@ -1295,6 +1295,9 @@ begin:
for (;;) {
redraw(path);
nochange:
+ /* Exit if parent has exited */
+ if (getppid() == 1)
+ _exit(0);
sel = nextsel(&run, &env);
switch (sel) {
case SEL_CDQUIT: