no more SIOCDONE
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Sat, 8 Jan 1983 12:38:00 +0000 (04:38 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Sat, 8 Jan 1983 12:38:00 +0000 (04:38 -0800)
SCCS-vsn: libexec/telnetd/telnetd.c 4.15
SCCS-vsn: libexec/rlogind/rlogind.c 4.8
SCCS-vsn: libexec/rexecd/rexecd.c 4.6
SCCS-vsn: libexec/rshd/rshd.c 4.7

usr/src/libexec/rexecd/rexecd.c
usr/src/libexec/rlogind/rlogind.c
usr/src/libexec/rshd/rshd.c
usr/src/libexec/telnetd/telnetd.c

index 539b036..3156525 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rexecd.c   4.5 82/12/25";
+static char sccsid[] = "@(#)rexecd.c   4.6 83/01/07";
 #endif
 
 #include <sys/ioctl.h>
 #endif
 
 #include <sys/ioctl.h>
@@ -192,8 +192,7 @@ doit(f, fromp)
                                if (ready & (1<<pv[0])) {
                                        cc = read(pv[0], buf, sizeof (buf));
                                        if (cc <= 0) {
                                if (ready & (1<<pv[0])) {
                                        cc = read(pv[0], buf, sizeof (buf));
                                        if (cc <= 0) {
-                                               int done = 1+1;
-                                               ioctl(s, SIOCDONE, (char *)&done);
+                                               shutdown(s, 1+1);
                                                readfrom &= ~(1<<pv[0]);
                                        } else
                                                (void) write(s, buf, cc);
                                                readfrom &= ~(1<<pv[0]);
                                        } else
                                                (void) write(s, buf, cc);
index 6ea4bd6..29c32e0 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rlogind.c  4.7 82/12/29";
+static char sccsid[] = "@(#)rlogind.c  4.8 83/01/07";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -266,11 +266,10 @@ gotpty:
 
 cleanup()
 {
 
 cleanup()
 {
-       int how = 2;
 
        rmut();
        vhangup();              /* XXX */
 
        rmut();
        vhangup();              /* XXX */
-       ioctl(netf, SIOCDONE, &how);
+       shutdown(netf, 2);
        kill(0, SIGKILL);
        exit(1);
 }
        kill(0, SIGKILL);
        exit(1);
 }
index 9c207f8..15d80c3 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rshd.c     4.6 82/12/25";
+static char sccsid[] = "@(#)rshd.c     4.7 83/01/07";
 #endif
 
 #include <sys/ioctl.h>
 #endif
 
 #include <sys/ioctl.h>
@@ -216,8 +216,7 @@ doit(f, fromp)
                                if (ready & (1<<pv[0])) {
                                        cc = read(pv[0], buf, sizeof (buf));
                                        if (cc <= 0) {
                                if (ready & (1<<pv[0])) {
                                        cc = read(pv[0], buf, sizeof (buf));
                                        if (cc <= 0) {
-                                               int done = 1+1;
-                                               ioctl(s, SIOCDONE, (char *)&done);
+                                               shutdown(s, 1+1);
                                                readfrom &= ~(1<<pv[0]);
                                        } else
                                                (void) write(s, buf, cc);
                                                readfrom &= ~(1<<pv[0]);
                                        } else
                                                (void) write(s, buf, cc);
index cccb361..144e873 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)telnetd.c  4.14 82/12/29";
+static char sccsid[] = "@(#)telnetd.c  4.15 83/01/07";
 #endif
 
 /*
 #endif
 
 /*
@@ -579,11 +579,10 @@ netflush()
 
 cleanup()
 {
 
 cleanup()
 {
-       int how = 2;
 
        rmut();
        vhangup();      /* XXX */
 
        rmut();
        vhangup();      /* XXX */
-       ioctl(net, SIOCDONE, &how);
+       shutdown(net, 2);
        kill(0, SIGKILL);
        exit(1);
 }
        kill(0, SIGKILL);
        exit(1);
 }