Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jan 2001 05:40:02 -0800 (PST)
From:      Thomas Moestl <tmoestl@gmx.net>
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/24705: Bug concerning Xwrapper/XFree86-4.0.2
Message-ID:  <200101291340.f0TDe2J65662@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/24705; it has been noted by GNATS.

From: Thomas Moestl <tmoestl@gmx.net>
To: freebsd-gnats-submit@FreeBSD.org, sepp@saargate.de
Cc:  
Subject: Re: ports/24705: Bug concerning Xwrapper/XFree86-4.0.2
Date: Mon, 29 Jan 2001 14:30:07 +0100

 > > The bug occured when I was trying to start my recently installed
 > > XFree86-4.0.2 (installed by the ports) with the little help of
 > > Xwrapper that is delivered with the dists of xfree.
 > > All you need to reproduce this problem is a current version of
 > > Xwrapper with x-right, that you get by ftp for example, an account
       
 > Hi, Sebastian.  Looking at
 > ftp://ftp.xfree86.org/pub/XFree86/4.0.2/source/FILES, I don't see a
 > wrapper.c file listed.  Are you using the one from an older version of
 > XFree86?  Are you using the one from x11/wrapper in the ports collection
 > (it doesn't sound like you are)?  Are you using one from another operating
 > system?  Let us know where to find it.
 I guess he is using the x11/wrapper port. I can reproduce it using that
 one.
       
 > > (e.g. telnet) and a
 > > self-written script called .xserverrc, that contains following
 > > phrase:
 > > exec Xwrapper $dspnum &args
 > > It is _very important_ that you use an "&" instead of "$" in front
 > > of "args"!
 > I placed the .xserverrc file in my $HOME, which is where startx usually
 > looks for it.  With the startx script I have--unmodified from the way it
 > was installed from the XFree86-4.0.1_3 port--I get:
 >      
 > 	$ startx
 >  
 > 	args: not found
 >     
 > 	Fatal server error:
 > 	Server is already active for display 0
 >                     If this server is no longer running, remove /tmp/.X0-lock
 >                     and start again.
 > [...]
 I have not experienced this error. Are you sure that you did not have an
 instance of XFree86 running on display 0?
 
 > I tried making the .xserverrc read:
 >
 >       exec startx $dspnum &args
 >      
 >  and it forked numerous times, after which I got the message:
 >      
 >       xinit:  X server slow to shut down, sending KILL signal.
 >      
 > but X kept running.  Do you have a command called "args" in your path?
 > Have you set resource limits in /etc/login.conf?  By default they are
 > turned off.
 This has nothing to do with the "args". A .xserverrc of
 	exec Xwrapper $dspnum &
 or 
 	exec XFree86 $dspnum &
 (run as root) will suffice. This is triggered when XFree86 is put in the
 background in the .xserverrc (there are other possible constellations
 where this might happen without using xinit). I have only tried this on 
 4.0.2, but the that part code does not seem to have changed much since 
 4.0.
 
 The following patch should eliminate this behaviour:
 ------------------------------------------------------------------------
 *** xc/programs/Xserver/os/connection.c.orig	Mon Jan 29 04:16:54 2001
 --- xc/programs/Xserver/os/connection.c	Mon Jan 29 04:08:32 2001
 ***************
 *** 408,414 ****
   	RunFromSmartParent = TRUE;
       ParentProcess = getppid ();
       if (RunFromSmartParent) {
 ! 	if (ParentProcess > 0) {
   	    kill (ParentProcess, SIGUSR1);
   	}
       }
 --- 408,414 ----
   	RunFromSmartParent = TRUE;
       ParentProcess = getppid ();
       if (RunFromSmartParent) {
 ! 	if (ParentProcess > 1) {
   	    kill (ParentProcess, SIGUSR1);
   	}
       }
 ------------------------------------------------------------------------
 For a complete explanation, please see my recent post on -security
 http://docs.freebsd.org/cgi/getmsg.cgi?fetch=18733+0+current/freebsd-security
 (sorry, non-permanent location).
 
 	- thomas
 
 


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




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