On Fri, Nov 05, 2010 at 09:38:24AM +0100, Nick Hibma wrote: > Mark, > > My 2 cents: Isn't it more appropriate to set FD_CLOEXEC on the fd? > > fcntl(fd, F_SETFD, FD_CLOEXEC); > > It doesn't sound like you ever want to have a cached connection be copied > into the child. Mum and child calling daddy using the same phone line isn't > going to make the conversation any easier for daddy. > > Cheers, > > Nick
The problem is that libfetch's ftp functions use an interface set up by funopen(3), so functions like fetchGetURL return a FILE*. However, I can't use something like fileno(3) to get the descriptor to pass to fcntl, because libfetch's FILE * is actually a struct ftpio *, which is only in ftp.c, i.e. not in the headers. I think using fcntl is nicer than having a "close the cached connection" function, but I don't think I can get around this problem without changing something in libfetch. Thanks, -Mark _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"