Date: Tue, 7 Nov 2006 12:37:07 -0500 From: Jung-uk Kim <jkim@FreeBSD.org> To: Divacky Roman <xdivac02@stud.fit.vutbr.cz> Cc: freebsd-emulation@FreeBSD.org Subject: Re: [PATCH]: possible fix for the fifoor problem Message-ID: <200611071237.11856.jkim@FreeBSD.org> In-Reply-To: <20061107171904.GA50772@stud.fit.vutbr.cz> References: <20061106174033.GA70360@stud.fit.vutbr.cz> <200611071201.11899.jkim@FreeBSD.org> <20061107171904.GA50772@stud.fit.vutbr.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 07 November 2006 12:19 pm, Divacky Roman wrote: > the patch is wrong.... this forces NONBLOCKing on all opened files > which is wrong. Nope. It does not force anything. static void translate_path_major_minor(struct thread *td, char *path, struct stat *buf) { struct proc *p = td->td_proc; struct filedesc *fdp = p->p_fd; struct file *fp; int fd; int temp; temp = td->td_retval[0]; if (kern_open(td, path, UIO_SYSSPACE, O_RDONLY, 0) != 0) return; fd = td->td_retval[0]; td->td_retval[0] = temp; translate_fd_major_minor(td, fd, buf); FILEDESC_LOCK(fdp); fp = fdp->fd_ofiles[fd]; FILEDESC_UNLOCK(fdp); fdclose(fdp, fdp->fd_ofiles[fd], fd, td); } As you can see the function is only used internally to convert major/minor and fd is closed at the end of the function. > according to a comment in linux source code linux never blocks for > O_RDWR which is what I tried to implement with my patch We don't advertise it but we do the same, AFAIK. ;-) Jung-uk Kim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611071237.11856.jkim>