On Tuesday 11 November 2008 09:55:59 am Ed Schouten wrote: > Author: ed > Date: Tue Nov 11 14:55:59 2008 > New Revision: 184849 > URL: http://svn.freebsd.org/changeset/base/184849 > > Log: > Several cleanups related to pipe(2). > > - Use `fildes[2]' instead of `*fildes' to make more clear that pipe(2) > fills an array with two descriptors. > > - Remove EFAULT from the manual page. Because of the current calling > convention, pipe(2) raises a segmentation fault when an invalid > address is passed. > > - Introduce kern_pipe() to make it easier for binary emulations to > implement pipe(2). > > - Make Linux binary emulation use kern_pipe(), which means we don't have > to recover td_retval after calling the FreeBSD system call.
To close fd's safely on error you need to use fdclose(). That would mean returning the actual 'struct file *' pointers from kern_pipe() and requiring the caller to fdrop(), but that is not a big deal. -- John Baldwin _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "[EMAIL PROTECTED]"