Subject: Exec calling bash script hangs

From: TG <[email-masked]>
Date: Sun, 18 Jul 1999 10:32:41 +0200

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..

I use RedHat 6.0, XFree86-3.3.3.1.

Greetings,

Tung
--
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: "Jason E. Kibblewhite" <[email-masked]>
Date: Sun, 18 Jul 1999 04:50:11 -0600

> link to bash, which confuses me even more..

I'm  no bash expert here but I think that's is the normal.  All bash
scripts should use /bin/sh rather then bash.
I believe called as /bin/bash it runs the shell program, as /bin/sh it just
runs the interpreter.
I'm not sure how the the other shells work but I know that you can have
programs work differently depending on just the file name it's called, gzip
and gunzip work that way also for example.

It's not a fvwm2 question and more of a bash question.  If you run the
script from an xterm do a jobs or ps and see how many bashes you are
running, I'll bet it goes up.  Then change it to /bin/sh and do it again it
shouldn't change.

---

From: TG <[email-masked]>
Date: Tue, 20 Jul 1999 10:42:10 +0200

> running, I'll bet it goes up.  Then change it to /bin/sh and do it again it

Yep, you're right here. Using bash instead of sh increments the number
of bashes running.

I tested a bash script in Enlightenment (ugh!) and it worked fine there.
Well, it isn't that hard to change my bash scripts into sh scripts, so I
don't really mind. It's just a pity.

Regards,

Tung