Subject: Re: Exec calling bash script hangs

From: Dominik Vogt <[email-masked]>
Date: Sun, 1 Aug 1999 05:32:04 +0200

On Sun, Jul 18, 1999 at 10:32:41AM +0200, TG wrote:
> 
> I have a problem calling bash scripts in fvwm2 (both 2.2 as CVS version)
> and I can't figure out what's wrong. My scripts looks like this.
> 
> ---
> #!/bin/bash
> echo "This is bash"
> ---
> 
> I can execute it without any problem from the commandline or in a xterm,
> and the script is located in PATH. But when I put it in a menu and call
> it within fvwm2, the latter hangs. Only the mouse cursor can be moved,
> focus doesn't follow the cursor anymore, and all I can do is killing the
> xserver explicitely. I even can't kill the script with SIGKILL.
> 
> When I changed bash into sh the script works fine, until it calls
> another bash script internally. It seems that all other shells I have
> here (csh, tcsh, ash), work fine too. By the way, sh is just a symbolic
> link to bash, which confuses me even more..

This has to work and it does indeed work for me. It doesn't matter at all
how many subshells bash invokes. Fvwm should simply fork off a bash that
is running asynchronously. Fvwm doesn't care what the process does.

(my bash version is 2.02.1)

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Steve Robbins <[email-masked]>
Date: Wed, 4 Aug 1999 10:43:40 -0400 (EDT)

> is running asynchronously. Fvwm doesn't care what the process does.

Yeah, that's true.

Maybe the original poster's problem is that he/she has something in a
.bashrc file that stops and waits for input, or does something similarly
odd.  Changing to #!/bin/sh means that the BASH-specific startup files are
not run, which explains the change in behaviour.

Try running the script, then look at 'pstree' to see what is hanging the
script.  Or check carefully through .bashrc (and maybe something in /etc
?).

P.S.  The way to kill a shell script is with SIGHUP.  I think you have to
kill off any children, first, though.