From owner-freebsd-emulation@FreeBSD.ORG Tue Nov 7 17:37:50 2006 Return-Path: X-Original-To: freebsd-emulation@FreeBSD.org Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C05B216A4F4 for ; Tue, 7 Nov 2006 17:37:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id C363E43D45 for ; Tue, 7 Nov 2006 17:37:27 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id kA7HbOll043359; Tue, 7 Nov 2006 12:37:24 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Divacky Roman Date: Tue, 7 Nov 2006 12:37:07 -0500 User-Agent: KMail/1.6.2 References: <20061106174033.GA70360@stud.fit.vutbr.cz> <200611071201.11899.jkim@FreeBSD.org> <20061107171904.GA50772@stud.fit.vutbr.cz> In-Reply-To: <20061107171904.GA50772@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200611071237.11856.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88/2172/Tue Nov 7 09:04:48 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: freebsd-emulation@FreeBSD.org Subject: Re: [PATCH]: possible fix for the fifoor problem X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2006 17:37:50 -0000 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