diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-09 16:41:04 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2011-10-09 16:41:04 +0000 |
commit | e1fc51c3a1d944193032d8bb1d95741d090b6d3b (patch) | |
tree | 7a2121c73a5acb69a080e73ad8e3b50cc3670616 /pd/src/s_watchdog.c | |
parent | 21c068f1916330e90f814bed461fe0821d1665ec (diff) |
checked in pd-0.43-1test4.src.tar.gz
svn path=/trunk/; revision=15558
Diffstat (limited to 'pd/src/s_watchdog.c')
-rw-r--r-- | pd/src/s_watchdog.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pd/src/s_watchdog.c b/pd/src/s_watchdog.c index 2602334d..d595773c 100644 --- a/pd/src/s_watchdog.c +++ b/pd/src/s_watchdog.c @@ -18,7 +18,7 @@ int main(int argc, char **argv) while (1) { struct timeval timout; - fd_set readset; + fd_set readset, exceptset; if (happy) { timout.tv_sec = 5; @@ -31,7 +31,11 @@ int main(int argc, char **argv) } FD_ZERO(&readset); FD_SET(0, &readset); - select(1, &readset, 0, 0, &timout); + FD_ZERO(&exceptset); + FD_SET(0, &exceptset); + select(1, &readset, 0, &exceptset, &timout); + if (FD_ISSET(0, &exceptset)) + return (0); if (FD_ISSET(0, &readset)) { char buf[100]; |