[comp.windows.x] Twm hangs doing an xhost

gdykes@batcomputer.tn.cornell.edu (Gene Dykes) (02/20/90)

When running twm, if I click on a menu entry with the following binding:

	f.exec "xhost hostname"

twm just hangs, and I have to kill it off (with great difficulty).  Since
SIGQUIT won't kill it, I can't get a core dump to track down the problem.
Just executing "xhost hostname" is no problem, and uwm doesn't suffer from
this difficulty.  Twm seems to run pretty well, otherwise.  Any clues?

(HP 9000/835, HPUX V3.1, X11R4 with Patch1)

-- 
Gene Dykes, gdykes@tcgould.tn.cornell.edu

meo@stiatl.UUCP (Miles O'Neal) (02/21/90)

In article <9751@batcomputer.tn.cornell.edu> gdykes@batcomputer.tn.cornell.edu (Gene Dykes) writes:
|
|When running twm, if I click on a menu entry with the following binding:
|
|	f.exec "xhost hostname"
|
|twm just hangs, and I have to kill it off (with great difficulty).  Since
|SIGQUIT won't kill it, I can't get a core dump to track down the problem.
|Just executing "xhost hostname" is no problem, and uwm doesn't suffer from
|this difficulty.  Twm seems to run pretty well, otherwise.  Any clues?

haven't tried under R4, but under R2 & R3, you need to throw it
into background with a & .

-Miles O'Neal
{yr fave backbone here}!emory!stiatl!meo

simon@opal.tu-berlin.de (Simon Leinen) (02/23/90)

In article <9751@batcomputer.tn.cornell.edu> gdykes@batcomputer.tn.cornell.edu (Gene Dykes) writes:

   When running twm, if I click on a menu entry with the following binding:

	   f.exec "xhost hostname"

   twm just hangs, and I have to kill it off (with great difficulty).

I had this problem too, and found two solutions for it.  You can
simply start xhost in the background, by saying

	f.exec "xhost hostname" &

od you can add a line

	NoGrabServer

to the .twmrc file.  I think the problem is that xhost will try to
make a connection to the X server, but the server is grabbed by twm
while the menu is posted.  The menu will not be removed until xhost
has returned, so this is a very beautiful case of deadlock.

You can also do both of the above, which is what I do.
-- 
Simon Leinen.