Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S270326AbTGWOKV (ORCPT ); Wed, 23 Jul 2003 10:10:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S270368AbTGWOKU (ORCPT ); Wed, 23 Jul 2003 10:10:20 -0400 Received: from crosslink-village-512-1.bc.nu ([81.2.110.254]:27384 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S270326AbTGWOKQ (ORCPT ); Wed, 23 Jul 2003 10:10:16 -0400 Subject: Re: kernel bug in socketpair() From: Alan Cox To: David Korn Cc: Linux Kernel Mailing List , gsf@research.att.com In-Reply-To: <200307231332.JAA26197@raptor.research.att.com> References: <200307231332.JAA26197@raptor.research.att.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Message-Id: <1058970007.5520.68.camel@dhcp22.swansea.linux.org.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 23 Jul 2003 15:20:08 +0100 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 20 On Mer, 2003-07-23 at 14:32, David Korn wrote: > The first problem is that files created with socketpair() are not accessible > via /dev/fd/n or /proc/$$/fd/n where n is the file descriptor returned > by socketpair(). Note that this is not a problem with pipe(). This is intentional - sockets do not have an "open" operation currently. > The second problem is that if fchmod(fd,S_IWUSR) is applied to the write end > of a pipe(), it causes the read() end to also be write only so that > opening /dev/fd/n for read fails. That doesn't directly suprise me. Our pipes are BSD style not streams pipes. One thing that means is that the pipe itself is a single inode. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/