Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13904 - virtualx.eclass infinate loop
Summary: virtualx.eclass infinate loop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-14 06:27 UTC by J Robert Ray
Modified: 2003-01-21 19:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description J Robert Ray 2003-01-14 06:27:09 UTC
while [ ! -f /tmp/.X${XDISPLAY}-lock ]
do
        XDISPLAY=$((${XDISPLAY}+1))
        /usr/X11R6/bin/Xvfb :${XDISPLAY} -screen 0 800x600x32 &>/dev/null &
        sleep 2
done

If Xvfb has a problem that is unrecoverable, this will loop forever.  Consider:

# /usr/X11R6/bin/Xvfb :0 -screen 0 800x600x32
/usr/X11R6/bin/Xvfb: error while loading shared libraries: libpam.so.0: cannot
open shared object file: No such file or directory

The while loop should be clamped to some reasonable high value for ${XDISPLAY}
and should error out if that value is reached.

If the high value is reached, the output from Xvfb should be captured and
displayed to the user in the error message, to give some clue as to what happened.

I'd also recommend giving a starting value for ${XDISPLAY} as a largish number,
and not 0, to lessen the chance of colliding with a used display.
Comment 1 J Robert Ray 2003-01-21 19:48:41 UTC
I committed a fix for this.