* OR MODIFICATIONS.
*/
-#ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.26 1999/04/27 22:33:09 varadhan Exp $";
-#endif
+#define RCSID "$Id: sys-osf.c,v 1.30 1999/08/13 06:46:18 paulus Exp $"
#include <stdio.h>
#include <stddef.h>
#include "pppd.h"
+static const char rcsid[] = RCSID;
+
static int pppfd;
static int fdmuxid = -1;
static int iffd;
if (i != fd && i != sockfd)
close(i);
closed_stdio = 1;
+ /* make sure 0, 1, 2 are open to /dev/null */
+ while ((i = open("/dev/null", O_RDWR)) >= 0) {
+ if (i > 2) {
+ close(i);
+ break;
+ }
+ }
}
/*
flags = 0;
len = getmsg(pppfd, &ctrl, &data, &flags);
if (len < 0) {
- if (errno = EAGAIN || errno == EWOULDBLOCK || errno == EINTR)
+ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)
return -1;
fatal("Error reading packet: %m");
}