[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [trapping SIGCHLD inside a shellscript]

From: Chet Ramey
Subject: Re: [trapping SIGCHLD inside a shellscript]
Date: Tue, 10 Apr 2001 16:36:18 -0400

> Machine Type: i586-mandrake-linux-gnu
> Bash Version: 2.04
> Patch Level: 12
> Release Status: release
> Description:
> It seems that trapping on SIGCHLD inside shellscripts doesnt work as
> expected. Maybe the same thing goes for other signals too, but i havent
> tested this. When I set a trap on SIGCHLD on the bash prompt, the trap works
> as expected, but when I try the same thing in a shell script, the signal
> doesnt seem to get caught. Let me clarify this by giving an example here.

Non-interactive shells don't enable job control by default.  See if
putting `set -o monitor' at the beginning of the script produces the
results you want.

``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]