error("Couldn't reopen /dev/ppp: %m");
goto err;
}
+ (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
if (ioctl(fd, PPPIOCATTCHAN, &chindex) < 0) {
error("Couldn't attach to channel %d: %m", chindex);
goto err_close;
*/
void add_fd(int fd)
{
+ if (fd >= FD_SETSIZE)
+ fatal("internal error: file descriptor too large (%d)", fd);
FD_SET(fd, &in_fds);
if (fd > max_in_fd)
max_in_fd = fd;