From: Paul Mackerras Date: Fri, 27 May 1994 01:02:48 +0000 (+0000) Subject: add ioctl for SIGIO to establish_ppp X-Git-Tag: ppp-2-1-2a~14 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=9061e74eee6de8be3478fd23caa2ac9ceae586ec;ds=sidebyside add ioctl for SIGIO to establish_ppp --- 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); + } } /*