]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/tty.c
Stop the charshunt process after running the disconnector,
[ppp.git] / pppd / tty.c
index a911fde5c0f0b34f274a56763f8d075aa98f67f2..1ef8a52eacae3bf8a6560005c2659214e1186622 100644 (file)
@@ -68,7 +68,7 @@
  * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#define RCSID  "$Id: tty.c,v 1.22 2004/11/13 12:07:29 paulus Exp $"
+#define RCSID  "$Id: tty.c,v 1.24 2005/07/12 01:09:05 paulus Exp $"
 
 #include <stdio.h>
 #include <ctype.h>
@@ -755,14 +755,6 @@ int connect_tty()
                close(pty_master);
                pty_master = -1;
        }
-       if (pty_slave >= 0) {
-               close(pty_slave);
-               pty_slave = -1;
-       }
-       if (real_ttyfd >= 0) {
-               close(real_ttyfd);
-               real_ttyfd = -1;
-       }
        ttyfd = -1;
        if (got_sigterm)
                asked_to_quit = 1;
@@ -781,6 +773,7 @@ void disconnect_tty()
        } else {
                info("Serial link disconnected.");
        }
+       stop_charshunt(NULL, 0);
 }
 
 void tty_close_fds()
@@ -944,7 +937,6 @@ start_charshunt(ifd, ofd)
        exit(0);
     }
     charshunt_pid = cpid;
-    add_notifier(&sigreceived, stop_charshunt, 0);
     record_child(cpid, "pppd (charshunt)", charshunt_done, NULL);
     return 1;
 }