projects
/
infodrom
/
newmail
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Terminate if the tty is gone
[infodrom/newmail]
/
newmail.c
diff --git
a/newmail.c
b/newmail.c
index
6c9023b
..
e96bd16
100644
(file)
--- a/
newmail.c
+++ b/
newmail.c
@@
-90,6
+90,10
@@
int main(int argc, char *argv[])
/* wait for the next incarnation */
sleep (opt_interval);
+
+ /* Terminate if we lost out tty */
+ if (!isatty(1))
+ return 1;
}
/* Not reached */