In the endless batch mode (-B), terminate if and when stdout is closed.
That mode is useful to call gstat from other app, however kinda useless since gstat won't exit and stay running forever when its parent process has long gone. MFC after: 2 weeks
This commit is contained in:
parent
0e533c72bc
commit
d065b3eb9e
@ -517,7 +517,8 @@ main(int argc, char **argv)
|
||||
if (!flag_B)
|
||||
loop = 0;
|
||||
else
|
||||
fflush(stdout);
|
||||
if (fflush(stdout) == EOF)
|
||||
goto out;
|
||||
usleep(flag_I);
|
||||
continue;
|
||||
}
|
||||
@ -585,7 +586,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
if (!flag_b) {
|
||||
el_end(el);
|
||||
endwin();
|
||||
|
Loading…
Reference in New Issue
Block a user