summaryrefslogtreecommitdiffstats
path: root/sys/net/if_sl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r--sys/net/if_sl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index 228f396..c2e0e17 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -83,6 +83,7 @@
#include <sys/kernel.h>
#include <sys/conf.h>
#include <sys/module.h>
+#include <sys/proc.h>
#include <net/if.h>
#include <net/if_types.h>
@@ -1076,9 +1077,13 @@ sl_keepalive(chan)
struct sl_softc *sc = chan;
if (sc->sc_keepalive) {
- if (sc->sc_flags & SC_KEEPALIVE)
- pgsignal (sc->sc_ttyp->t_pgrp, SIGURG, 1);
- else
+ if (sc->sc_flags & SC_KEEPALIVE) {
+ if (sc->sc_ttyp->t_pgrp != NULL) {
+ PGRP_LOCK(sc->sc_ttyp->t_pgrp);
+ pgsignal (sc->sc_ttyp->t_pgrp, SIGURG, 1);
+ PGRP_UNLOCK(sc->sc_ttyp->t_pgrp);
+ }
+ } else
sc->sc_flags |= SC_KEEPALIVE;
sc->sc_kahandle = timeout(sl_keepalive, sc, sc->sc_keepalive);
} else {
OpenPOWER on IntegriCloud