]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/main.c
Check for EAGAIN as well as EWOULDBLOCK, since they are
[ppp.git] / pppd / main.c
index 4171accd7204b1dc1c64c2f12829d7042857c1c5..1c570eee7860338ae31139ef7f4ed6e06d46a4e2 100644 (file)
@@ -40,7 +40,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: main.c,v 1.129 2003/09/23 15:11:58 kad Exp $"
+#define RCSID  "$Id: main.c,v 1.131 2004/01/13 04:00:34 paulus Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -589,7 +589,8 @@ main(argc, argv)
         */
     disconnect:
        new_phase(PHASE_DISCONNECT);
-       the_channel->disconnect();
+       if (the_channel->disconnect)
+           the_channel->disconnect();
 
     fail:
        if (the_channel->cleanup)
@@ -1337,8 +1338,8 @@ kill_my_pg(sig)
 
     act.sa_handler = SIG_IGN;
     act.sa_flags = 0;
-    kill(0, sig);
     sigaction(sig, &act, &oldact);
+    kill(0, sig);
     sigaction(sig, &oldact, NULL);
 }