X windows

Mark Callow msc at ramoth.esd.sgi.com
Fri Jan 11 08:26:10 AEST 1991


In article <1991Jan10.135009 at crocus.medicine.rochester.edu>, ajp2o at crocus.medicine.rochester.edu (Anthony J. Persechini) writes:
|> I have been having problems figuring out how to
|> build an X resource database for a few applications,
|> 
|> /RestartActions [ 
|> { (gamma 1.0) forkunix }
|> { RunConsole }
|> { (/usr/bin/X11/xrdb -merge /usr/people/ajp2o/.idraw) forkunix }
|> { (/usr/bin/X11/xrdb -merge /usr/lib/X11/app-defaults/XCal) forkunix }
|> { (/usr/bin/X11/xsetroot -solid deepskyblue3) forkunix }
|> { (.4sight/hostchest) forkunix }
|> { (.4sight/newschest) forkunix }
|> { (.4sight/modelchest) forkunix }
|> { (/usr/local/X11/bin/xbiff -geometry +20+167 -bg skyblue2 -fg red
|> -hide) forkunix }
|> { (/usr/local/X11/bin/xcal -bg skyblue2 -fg midnightblue -geometry
|> 90x25+20+289) forkunix }
|> ] def
|> 
|> Sometimes fails, or perhaps only one of the rdb lines works. I have
|> tried

There is a race condition here. The news server executes the forkunix and
goes on to the next item.  Some time later, the client that was forked 
actually runs. Therefore it is possible that abiff and xcal are getting to
run before xrdb has run.

The way we worked around this for NeWS clients was to use "seqfork" instead
of "forkunix". This waits for something to connect to the NeWS server
before continuing thereby forcing everything to happen in sequence.
Seqfork won't work in this case because the X clients don't talk to the
NeWS server.

Of the top of my hea, I'd say put these commands in a shell script that
waits for the Xrdb calls to finish before running the other clients. You
can call this shell script from your user.ps.
-- 
>From the TARDIS of Mark Callow
msc at ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"Spirits of genius are always opposed by mediocre minds" - Albert Einstein



More information about the Comp.sys.sgi mailing list