summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/io.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-02-13 20:43:21 +0100
committerMartin Mares <mj@ucw.cz>1999-02-13 20:43:21 +0100
commit4c9dd1e4b95e273eacc900abb63db4b8bafaf34b (patch)
tree36b8376959e89cecaeefdb7deff04b50cad6cb7f /sysdep/unix/io.c
parent1a54b1c6ac5177a1ef21f799f6cf28f355c5bbe9 (diff)
downloadbird-4c9dd1e4b95e273eacc900abb63db4b8bafaf34b.tar
bird-4c9dd1e4b95e273eacc900abb63db4b8bafaf34b.zip
Synchronize signals to the main select/event/timer loop.
Parse command line options.
Diffstat (limited to 'sysdep/unix/io.c')
-rw-r--r--sysdep/unix/io.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index bb8f8af..d8713f4 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -677,6 +677,9 @@ sk_dump_all(void)
* Main I/O Loop
*/
+volatile int async_config_flag; /* Asynchronous reconfiguration/dump scheduled */
+volatile int async_dump_flag;
+
void
io_init(void)
{
@@ -735,6 +738,24 @@ io_loop(void)
}
}
+ /*
+ * Yes, this is racy. But even if the signal comes before this test
+ * and entering select(), it gets caught on the next timer tick.
+ */
+
+ if (async_config_flag)
+ {
+ async_config();
+ async_config_flag = 0;
+ }
+ if (async_dump_flag)
+ {
+ async_dump();
+ async_dump_flag = 0;
+ }
+
+ /* And finally enter select() to find active sockets */
+
hi = select(hi+1, &rd, &wr, NULL, &timo);
if (hi < 0)
{