diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-19 17:53:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-01-19 17:53:20 +0000 |
commit | eaea12ff4f8a5979f9851fdd77caf066fec82cb6 (patch) | |
tree | cf9d9ac082f37838a97b60ad51c8b1d9b6c4ad38 /usr.sbin/moused | |
parent | f8a78e2664bf6f1f29ac701ec170911df3c4a47e (diff) |
mark remaining signal races which are difficult to fix
Diffstat (limited to 'usr.sbin/moused')
-rw-r--r-- | usr.sbin/moused/moused.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c index d23a5af153c..188752d328c 100644 --- a/usr.sbin/moused/moused.c +++ b/usr.sbin/moused/moused.c @@ -413,6 +413,7 @@ freedev(int sig) * own purpose. */ close(mouse.mfd); + mouse.mfd = -1; sigpause(0); errno = save_errno; } @@ -424,12 +425,12 @@ opendev(int sig) { /* re-open the mouse device */ if ((mouse.mfd = open(mouse.portname, O_RDWR | O_NONBLOCK, 0)) == -1) { - logerr(1, "unable to open %s", mouse.portname); - exit(1); + logerr(1, "unable to open %s", mouse.portname); /* XXX race */ + _exit(1); } /* re-init the mouse */ mouse_init(); - longjmp(restart_env, 1); + longjmp(restart_env, 1); /* XXX signal/longjmp re-entrancy */ } static void @@ -438,7 +439,7 @@ cleanup(int sig) char moused_flag = MOUSED_OFF; ioctl(mouse.cfd, PCVT_MOUSED, &moused_flag); - exit(0); + _exit(0); } /* @@ -2045,7 +2046,6 @@ main(int argc, char **argv) signal(SIGINT , cleanup); signal(SIGQUIT, cleanup); signal(SIGTERM, cleanup); - signal(SIGKILL, cleanup); if ((mouse.mfd = open(mouse.portname, O_RDWR | O_NONBLOCK, 0)) == -1) logerr(1, "unable to open %s", mouse.portname); |