Exit if parent has exited (#16)

This commit is contained in:
aaeilm 2017-04-25 15:12:07 -04:00 committed by Arun Prakash Jana
parent 0fd6a392db
commit 92236abf31
1 changed files with 3 additions and 0 deletions

3
nnn.c
View File

@ -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: