=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsh/Attic/rsh.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/rsh/Attic/rsh.c 1997/01/15 23:43:09 1.11 --- src/usr.bin/rsh/Attic/rsh.c 1997/03/26 19:41:59 1.12 *************** *** 1,4 **** ! /* $OpenBSD: rsh.c,v 1.11 1997/01/15 23:43:09 millert Exp $ */ /*- * Copyright (c) 1983, 1990 The Regents of the University of California. --- 1,4 ---- ! /* $OpenBSD: rsh.c,v 1.12 1997/03/26 19:41:59 deraadt Exp $ */ /*- * Copyright (c) 1983, 1990 The Regents of the University of California. *************** *** 41,47 **** #ifndef lint /*static char sccsid[] = "from: @(#)rsh.c 5.24 (Berkeley) 7/1/91";*/ ! static char rcsid[] = "$OpenBSD: rsh.c,v 1.11 1997/01/15 23:43:09 millert Exp $"; #endif /* not lint */ #include --- 41,47 ---- #ifndef lint /*static char sccsid[] = "from: @(#)rsh.c 5.24 (Berkeley) 7/1/91";*/ ! static char rcsid[] = "$OpenBSD: rsh.c,v 1.12 1997/03/26 19:41:59 deraadt Exp $"; #endif /* not lint */ #include *************** *** 328,334 **** bp = buf; rewrite: rembits = 1 << rem; ! if (select(16, 0, &rembits, 0, 0) < 0) { if (errno != EINTR) { (void)fprintf(stderr, "rsh: select: %s.\n", strerror(errno)); --- 328,334 ---- bp = buf; rewrite: rembits = 1 << rem; ! if (select(rem + 1, 0, &rembits, 0, 0) < 0) { if (errno != EINTR) { (void)fprintf(stderr, "rsh: select: %s.\n", strerror(errno)); *************** *** 363,369 **** readfrom = (1 << rfd2) | (1 << rem); do { ready = readfrom; ! if (select(16, &ready, 0, 0, 0) < 0) { if (errno != EINTR) { (void)fprintf(stderr, "rsh: select: %s.\n", strerror(errno)); --- 363,369 ---- readfrom = (1 << rfd2) | (1 << rem); do { ready = readfrom; ! if (select(MAX(rfd2, rem) + 1, &ready, 0, 0, 0) < 0) { if (errno != EINTR) { (void)fprintf(stderr, "rsh: select: %s.\n", strerror(errno));