diff options
author | Miles Bader <miles@gnu.org> | 1996-04-29 03:29:14 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-04-29 03:29:14 +0000 |
commit | 125f0f8aabff591e8314ea9ca105a9b3ae2e935c (patch) | |
tree | b866577cbb07b89fb2ebee3de796bd2f71bec46b /boot | |
parent | 5279347d044b999b6611b88f833a674ef70d3527 (diff) |
(main): Use select instead of SIGIO.
Diffstat (limited to 'boot')
-rw-r--r-- | boot/boot.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/boot/boot.c b/boot/boot.c index d3f62339..cf0f7894 100644 --- a/boot/boot.c +++ b/boot/boot.c @@ -391,7 +391,6 @@ main (int argc, char **argv, char **envp) char *buf = 0; char *bootscript; int i, len; - struct sigvec vec = { read_reply, 0, 0}; char *newargs; get_privileged_ports (&privileged_host_port, &master_device_port); @@ -539,10 +538,7 @@ main (int argc, char **argv, char **envp) read (0, &c, 1); } - foo = 1; init_termstate (); - ioctl (0, FIOASYNC, &foo); - sigvec (SIGIO, &vec, 0); /* The boot script has now been parsed into internal data structures. Now execute its directives. */ @@ -563,12 +559,20 @@ main (int argc, char **argv, char **envp) mach_port_deallocate (mach_task_self (), pseudo_master_device_port); - cthread_detach (cthread_fork ((cthread_fn_t) msg_thread, - (any_t) 0)); + cthread_detach (cthread_fork ((cthread_fn_t) msg_thread, (any_t) 0)); - while (1) + for (;;) { - sigpause (0); + fd_set rmask; + FD_ZERO (&rmask); + FD_SET (0, &rmask); + if (select (1, &rmask, 0, 0, 0) == 1) + read_reply (); + else + { /* We hosed */ + perror ("select"); + exit (5); + } } /* mach_msg_server (request_server, __vm_page_size * 2, receive_set); */ |