startdri script

Kevin Street kwsml at rogers.com
Mon Dec 22 00:48:01 UTC 2003


On Sun, 2003-12-21 at 12:33, Jared Holzman wrote:
> ... The only problem is, I can't get the script to kill the
> second X session when the game finished. Can anyone tell me what I'm
> doing wrong? The script is below...

> #!/bin/sh
> X -ac -xf86config XF86Config.dri :1 > /tmp/startdri.log &
> pid=`/sbin/pidof X | cut -d' ' -f1`
> export DISPLAY=:1
> sleep 1
> exec $1 >> /tmp/startdri.log
> kill $pid >> /tmp/startdri.log
> exit 0

exec replaces your shell with the program.  You never get to the lines
in the script following the exec.  Try just:
$1 >> /tmp/startdri.log

-- 
Kevin Street
street at rogers.com





More information about the fedora-list mailing list