Date: Tue, 10 Apr 2012 19:39:31 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: freebsd-emulation@FreeBSD.org Subject: Re: [PATCH] pipe2 for Linuxulator Message-ID: <201204101939.33201.jkim@FreeBSD.org> In-Reply-To: <201204101856.46591.jkim@FreeBSD.org> References: <201204101856.46591.jkim@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 10 April 2012 06:56 pm, Jung-uk Kim wrote: > Th attached patch implements pipe2 syscall for Linuxulator, which > is quite trivial. Although it was added in Linux 2.6.27 (thanks, > netchild!), it is often used by popular Linux applications, e.g., > Adobe Flash plugin. Please note linux_pipe() was moved from MD > files to sys/compat/linux/linux_file.c because both amd64 and i386 > versions looked the same and I failed to see any reason. I also > changed file descriptor argument from l_ulong * to l_int *, which > seemed more appropriate. Any objections? Oops, I missed a patch for sys/kern/kern_descript.c: Index: sys/kern/kern_descrip.c =================================================================== --- sys/kern/kern_descrip.c (revision 234112) +++ sys/kern/kern_descrip.c (working copy) @@ -1681,6 +1681,8 @@ finstall(struct thread *td, struct file *fp, int * } fhold(fp); fdp->fd_ofiles[*fd] = fp; + if ((flags & O_NONBLOCK) != 0) + fp->f_flag |= FNONBLOCK; if ((flags & O_CLOEXEC) != 0) fdp->fd_ofileflags[*fd] |= UF_EXCLOSE; FILEDESC_XUNLOCK(fdp); > * PS: This patch is also available from here: > > http://people.freebsd.org/~jkim/linux_pipe2.diff This patch is updated with it. Sorry, Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204101939.33201.jkim>