Drop unused return values in vtysh. Also gets rid of the rather funny
prototyping of signal setup in vtysh - which as a side effect makes it
not need AC_TYPE_SIGNAL in configure.ac anymore. It wasn't used
sensibly to begin with...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit
6769f43de9d595b935f2ebf1cae1428e1d1a3a5f)
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
-AC_TYPE_SIGNAL
AC_STRUCT_TM
dnl -------------------------
/* Signale wrapper for vtysh. We don't use sigevent because
* vtysh doesn't use threads. TODO */
-static RETSIGTYPE *
+static void
vtysh_signal_set (int signo, void (*func)(int))
{
- int ret;
struct sigaction sig;
struct sigaction osig;
sig.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
- ret = sigaction (signo, &sig, &osig);
-
- if (ret < 0)
- return (SIG_ERR);
- else
- return (osig.sa_handler);
+ sigaction (signo, &sig, &osig);
}
/* Initialization of signal handles. */