[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-users
Subject:    [ast-users] signals and traps
From:       dgk () research ! att ! com (David Korn)
Date:       2006-06-13 17:03:50
Message-ID: 200606132103.RAA24510 () raptor ! research ! att ! com
[Download RAW message or body]

Subject: Re: [ast-users] signals and traps
--------

> According to Bolsky & Korn, "The New KornShell", 1995, if a parent process ignor
> es a
> signal and then starts a ksh, the ksh process will also ignore the signal and ks
> h cannot 
> unignore it, i.e., traps set for the ignored signal will be ineffective.
> 
> Is this still true? If a parent ignores TERM and I want my ksh to catch it,
> am I stuck?
> 
> -Mario
> 

This was inherited from the Bourne shell.  The parent shell can do
	trap : TERM
rather than
	trap '' TERM
if it wants to ignore and allow child scripts to catch.

The only other alternative is a C program intermdiate program to
reenable the signal.

David Korn
dgk@research.att.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic