Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2016 11:58:17 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Shell script ignoring / blocking signals
Message-ID:  <030404da-2588-05c5-00fa-a2b6c32856b1@FreeBSD.org>
In-Reply-To: <000b01d1ad50$2a928790$7fb796b0$@ymail.com>
References:  <000b01d1ad50$2a928790$7fb796b0$@ymail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--v71fu2DcPiNGi1m7I81pQsPcMKLsxPb2b
Content-Type: multipart/mixed; boundary="16S99fgHUg7TROXENvuAbrEQgLNePRX0A"
From: Matthew Seaman <matthew@FreeBSD.org>
To: freebsd-questions@freebsd.org
Message-ID: <030404da-2588-05c5-00fa-a2b6c32856b1@FreeBSD.org>
Subject: Re: Shell script ignoring / blocking signals
References: <000b01d1ad50$2a928790$7fb796b0$@ymail.com>
In-Reply-To: <000b01d1ad50$2a928790$7fb796b0$@ymail.com>

--16S99fgHUg7TROXENvuAbrEQgLNePRX0A
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 13/05/2016 20:46, Andrew Wood via freebsd-questions wrote:
> If I run the script directly everything works fine, but if the script i=
s run
> from inside another shell script the signals are blocked (set to ignore=
) as
> indicated by procstat.

> Can someone please explain to me why this is happening and how I unbloc=
k
> them?

Hmmm... There was a problem with signal masks being propagated across
exec() call for a while, right around the time 10.3-RELEASE was
happening.  This is where the problem was fixed for STABLE-10:

https://svnweb.freebsd.org/base?view=3Drevision&revision=3D297789

and here for 10.3-RELEASE:

https://svnweb.freebsd.org/base?view=3Drevision&revision=3D297204

For this to bite you, you'ld need to be running a version of the OS with
an affected version of tcsh, and your shell needs to be descended from a
tcsh process somehow (remember that tcsh is root's default shell, so
this is more common than you might think.)

	Cheers,

	Matthew



--16S99fgHUg7TROXENvuAbrEQgLNePRX0A--

--v71fu2DcPiNGi1m7I81pQsPcMKLsxPb2b
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJXNwTPXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATq44QAJVUXJuSvJvQYW9pMnTHWH1f
UJC/B09iEfwQI22+Ag++XZOska7xpjQI2XAEeEg5lG0S5FJpxSPvUN8N7lnZ35GD
o+qxG4K6I1ttwlTjUh22X2cnWomYdbBQK0dvYSiUsmUoaMRceh6nZJ0d21JCbxyi
9jgkHR11tdFRph7xI84BM+wU4Ks6LZc9fBjyc0qLxFXPxUXx3y41WfN5vjT10aou
UKaMNC2N+s4sBQXJLLIzhFIZABpLxyHNdUVb7vyFqgnK2VbznIw9HzyuWKNOTMKv
DydHEZxkD+AUWFmEOIDpXjf0J9zYLlhwbDYUsupjcBEuG60gIjtTWka8NlDlecS5
gjWDBqk+PHU65crsr6xOXPAgpKpIVB4enVXV2QOKAj9cvgeL5t9QRbNOKy2hk9Da
xDN95flI/tUVrla7zOpCyL2blXGPoShMkclNApy7aimo/kRE0oGRaJgvTXD+076q
NPmUDVNIDHtQlbybKuGtRMAv5jA494aWlU8FvFGbi46kB/rVa2GgwGN0vleHSoem
ncaIEAN8l7hBzDd8/wGpbTYIPT82mlUJjy1/qz6dAV6eQi1zj711ma0Lc2OK04Yi
a7+PxNR4dRV4bmqU/kSJSIzb0qL6s+FR4S+khC4xhVASsyQDZSkyQ66vNoC6fRZ8
f/85fRd7JdDHFLiFyXZL
=TKFb
-----END PGP SIGNATURE-----

--v71fu2DcPiNGi1m7I81pQsPcMKLsxPb2b--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?030404da-2588-05c5-00fa-a2b6c32856b1>