[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] How to forbidden SIGINT be propagated from the parent sc
From: |
Greg Wooledge |
Subject: |
Re: [Help-bash] How to forbidden SIGINT be propagated from the parent script to the child script? |
Date: |
Fri, 29 May 2015 11:24:46 -0400 |
User-agent: |
Mutt/1.4.2.3i |
> On Fri, May 29, 2015 at 10:03 AM, Greg Wooledge <address@hidden> wrote:
> > The obvious way is to ignore SIGINT:
> >
> > trap '' INT
On Fri, May 29, 2015 at 10:17:48AM -0500, Peng Yu wrote:
> I assume that these changes should be done in the child scripts. Is
> there a way to modify the calling scripts so that child scripts will
> called in a way such that Ctrl-C does not have any effects on them?
Don't assume.
signal(7) on Debian says:
A child created via fork(2) inherits a copy of its parent's signal dis-
positions. During an execve(2), the dispositions of handled signals
are reset to the default; the dispositions of ignored signals are left
unchanged.