From 9061e74eee6de8be3478fd23caa2ac9ceae586ec Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Fri, 27 May 1994 01:02:48 +0000 Subject: [PATCH] add ioctl for SIGIO to establish_ppp --- pppd/sys-linux.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index cbf0558..aa829aa 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -94,6 +94,7 @@ int set_kdebugflag (int requested_level) void establish_ppp (void) { int pppdisc = N_PPP; + int sig = SIGIO; if (ioctl(fd, TIOCEXCL, 0) < 0) { syslog (LOG_WARNING, "ioctl(TIOCEXCL): %m"); @@ -115,6 +116,14 @@ void establish_ppp (void) } set_kdebugflag (kdebugflag); + + /* + * Set the device to give us a SIGIO when data is available. + */ + if (ioctl(fd, PPPIOCSINPSIG, &sig) == -1) { + syslog(LOG_ERR, "ioctl(PPPIOCSINPSIG): %m"); + die(1); + } } /* -- 2.39.2