summaryrefslogtreecommitdiff
path: root/vtysh
diff options
context:
space:
mode:
authorhasso <hasso>2004-08-28 17:04:33 +0000
committerhasso <hasso>2004-08-28 17:04:33 +0000
commite42f5a37462b22c49235f04a3b582b97c1deb84c (patch)
tree830ca9ab54224b7aac003c11b9c209472ddff860 /vtysh
parent69f1fc22f70b4baed62582cbaaefaf374665791c (diff)
Port ospf6d to sigevent and rename signal handling functions in vtysh not to
conflict the ones in lib/sigevent.c. Fixes compiling with --disable-shared.
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/ChangeLog5
-rw-r--r--vtysh/vtysh_main.c15
2 files changed, 13 insertions, 7 deletions
diff --git a/vtysh/ChangeLog b/vtysh/ChangeLog
index aab737b3..0dbcb0d7 100644
--- a/vtysh/ChangeLog
+++ b/vtysh/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-28 Hasso Tepper <hasso at quagga.net>
+
+ * vtysh_main.c: Rename signal handling functions not to conflict
+ with functions from lib/sigevent.c.
+
2004-08-27 Hasso Tepper <hasso at quagga.net>
* vtysh.c: Make "terminal length <0-512>" command work in vtysh.
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index e862efd6..223f0c6e 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -99,9 +99,10 @@ sigint (int sig)
}
}
-/* Signale wrapper. */
+/* Signale wrapper for vtysh. We don't use sigevent because
+ * vtysh doesn't use threads. TODO */
RETSIGTYPE *
-signal_set (int signo, void (*func)(int))
+vtysh_signal_set (int signo, void (*func)(int))
{
int ret;
struct sigaction sig;
@@ -124,11 +125,11 @@ signal_set (int signo, void (*func)(int))
/* Initialization of signal handles. */
void
-signal_init ()
+vtysh_signal_init ()
{
- signal_set (SIGINT, sigint);
- signal_set (SIGTSTP, sigtstp);
- signal_set (SIGPIPE, SIG_IGN);
+ vtysh_signal_set (SIGINT, sigint);
+ vtysh_signal_set (SIGTSTP, sigtstp);
+ vtysh_signal_set (SIGPIPE, SIG_IGN);
}
/* Help information display. */
@@ -243,7 +244,7 @@ main (int argc, char **argv, char **env)
line_read = NULL;
/* Signal and others. */
- signal_init ();
+ vtysh_signal_init ();
/* Make vty structure and register commands. */
vtysh_init_vty ();