/* -*-c-*-
*
- * $Id: fw.c,v 1.4 1999/10/10 16:46:12 mdw Exp $
+ * $Id: fw.c,v 1.5 1999/10/22 22:47:50 mdw Exp $
*
* Port forwarding thingy
*
/*----- Revision history --------------------------------------------------*
*
* $Log: fw.c,v $
+ * Revision 1.5 1999/10/22 22:47:50 mdw
+ * Grammar changes. Also, don't enable SIGINT if it's currently ignored.
+ *
* Revision 1.4 1999/10/10 16:46:12 mdw
* New resolver to initialize. Also, include options for grammar and
* options references.
exec.env.[set] var [=] value\n\
\n\
Socket options\n\
- socket.conn [=] number\n\
+ socket.conn [=] number|unlimited|one-shot\n\
socket.logging [=] yes|no\n\
socket.inet.[allow|deny] [from] address [/ address]\n\
socket.unix.fattr.*\n\
fattr_init(&fattr_global);
scan_create(&sc);
- /* --- Set up some signal handlers --- */
+ /* --- Set up some signal handlers --- *
+ *
+ * Don't enable @SIGINT@ if the caller already disabled it.
+ */
+
+ {
+ struct sigaction sa;
+
+ sig_add(&s_term, SIGTERM, fw_tidy, 0);
+ sigaction(SIGINT, 0, &sa);
+ if (sa.sa_handler != SIG_IGN)
+ sig_add(&s_int, SIGINT, fw_tidy, 0);
+ }
- sig_add(&s_term, SIGTERM, fw_tidy, 0);
- sig_add(&s_int, SIGINT, fw_tidy, 0);
atexit(fw_exit);
/* --- Parse command line options --- */