Date: Tue, 11 Nov 2008 11:25:33 -0500 From: John Baldwin <jhb@freebsd.org> To: Ed Schouten <ed@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184849 - in head: lib/libc/sys sys/amd64/linux32 sys/i386/linux sys/kern sys/sys Message-ID: <200811111125.33478.jhb@freebsd.org> In-Reply-To: <200811111455.mABEtxRH004631@svn.freebsd.org> References: <200811111455.mABEtxRH004631@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811111125.33478.jhb>