1 /* Copyright (c) 1997-2000 Miller Puckette.
2 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
3 * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
5 /* This file is compiled into the separate program, "pd-watchdog," which
6 tries to prevent Pd from locking up the processor if it's at realtime
7 priority. Linux only. Invoked from s_inter.c. */
10 #include <sys/types.h>
15 int main(int argc
, char **argv
)
20 struct timeval timout
;
34 select(1, &readset
, 0, 0, &timout
);
35 if (FD_ISSET(0, &readset
))
39 if (read(0, &buf
, 100) <= 0)
44 kill(getppid(), SIGHUP
);
45 fprintf(stderr
, "watchdog: signaling pd...\n");
48 /* Copyright (c) 1997-2000 Miller Puckette.
49 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
50 * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
52 /* This file is compiled into the separate program, "pd-watchdog," which
53 tries to prevent Pd from locking up the processor if it's at realtime
54 priority. Linux only. Invoked from s_inter.c. */
57 #include <sys/types.h>
62 int main(int argc
, char **argv
)
67 struct timeval timout
;
81 select(1, &readset
, 0, 0, &timout
);
82 if (FD_ISSET(0, &readset
))
86 if (read(0, &buf
, 100) <= 0)
91 kill(getppid(), SIGHUP
);
92 fprintf(stderr
, "watchdog: signaling pd...\n");