Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2002 00:31:35 -0700
From:      George <jirka@5z.com>
To:        Joe Marcus Clarke <marcus@marcuscom.com>
Cc:        gnome@FreeBSD.ORG
Subject:   Re: GDM 2.4.0.x & FreeBSD
Message-ID:  <20020807073135.GC1055@monique.linux.bogus>
In-Reply-To: <1028675476.690.61.camel@gyros.marcuscom.com>
References:  <20020715225248.GI19585@monique.linux.bogus> <20020729222247.E308-100000@shumai.marcuscom.com> <20020731170330.GB20594@monique.linux.bogus> <1028675476.690.61.camel@gyros.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 06, 2002 at 07:11:16PM -0400, Joe Marcus Clarke wrote:
> I tried your new file descriptor patch to slave.c, and this made things
> worse.  Now, gdm doesn't even start.  It continues to start, die, and
> restart, until it does so enough times, then the display is disabled.
> 
> To fix this, I took out the two lines that closed the child end of the
> pipes (lines 1507 and 1508).  On FreeBSD, if one end of a pipe is
> closed, the pipe is considered widowed, and the process gets hit with a
> SIGPIPE.  From FreeBSD's pipe(2) manpage:
> 
> "A pipe that has had an end closed is considered widowed.  Writing on
> such a pipe causes the writing process to receive a SIGPIPE signal. 
> Widowing a pipe is the only way to deliver end-of-file to a reader:
> after the reader consumes any buffered data, reading a widowed pipe
> returns a zero count.
> 
> The bidirectional nature of this implementation of pipes is not portable
> to older systems, so it is recommended to use the convention for using
> the endpoints in the traditional manner when using a pipe in one direc-
> tion."
> 
> However, even after removing the close calls, the problem with the
> unusable Username field remains.  The file descriptor numbers for the
> pipe ends remain constant at 9 for out and 10 for in.  This is true even
> if gdm is started manually without the --nodaemon option.

Hmmm, if I'm reading this correctly then freebsd's pipes would be mucho
broken.  It is quite normal to close the end of the pipe that you are not
using.  In fact it will naturally happen on the child anyway.  I suppose the
SIGPIPE came from the fcntl's.

Also I can't figure out why it wasn't doing that before.  We WERE closing the
pipes before as well, the only difference was the dup2.

George

-- 
George <jirka@5z.com>
   Personally, I'm always ready to learn, although I do not
   always like being taught.
                       -- Sir Winston Churchill

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020807073135.GC1055>