Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Aug 2011 22:50:35 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Slawa Olhovchenkov <slw@zxy.spb.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: sigwait return 4
Message-ID:  <20110824195035.GA17489@deviant.kiev.zoral.com.ua>
In-Reply-To: <20110824194229.GC48394@zxy.spb.ru>
References:  <20110824181907.GA48394@zxy.spb.ru> <20110824190703.GY17489@deviant.kiev.zoral.com.ua> <20110824192446.GB48394@zxy.spb.ru> <20110824193202.GZ17489@deviant.kiev.zoral.com.ua> <20110824194229.GC48394@zxy.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--WA7H3kVYsfCLkbZb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Aug 24, 2011 at 11:42:29PM +0400, Slawa Olhovchenkov wrote:
> On Wed, Aug 24, 2011 at 10:32:02PM +0300, Kostik Belousov wrote:
>=20
> > > > What should the system do for a delivered signal not present in the=
 set ?
> > > > I guess this is the case of your ktrace.
> > > >=20
> > > > Looking at the SUSv4, I see no mention of the situation, but in Ora=
cle
> > > > SunOS 5.10 man page for sigwait(2), it is said explicitely
> > > > EINTR The wait was interrupted by an unblocked, caught signal.
> > >=20
> > > I don't think you right in this case.
> > > This is kas-milter and in this thread (this is multi-thread
> > > application) kas-milter wait for USR2 for reload config.
> > >=20
> > > System return from sigwait only on USR2, but not each return w/
> > > non-zero return code.
> > >=20
> > > On freebsd7 this application don't complain about sigwait's return va=
lue.
> >=20
> > Could it be that some other thread has the signal unblocked ?
> > (You can verify this with procstat -j).
> >=20
> > Can you write the self-contained test case that demonstrates the behavi=
our ?
>=20
> This is closed-source software.
How is this statement related to the creation of the standalone test case ?

> # procstat -j
>   PID    TID COMM             SIG     FLAGS
>  1395 100199 kas-milter       USR2     --
>  1395 100232 kas-milter       USR2     --

Both threads have the signal not blocked. This is not definitive,
since signal must be blocked during the call to sigwait(2). Note that
the SUSv4 says that "The signals defined by set shall have been
blocked at the time of the call to sigwait(); otherwise, the behavior is
undefined."

--WA7H3kVYsfCLkbZb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAk5VVgoACgkQC3+MBN1Mb4gSqgCg1EVAlsC1UQ7Suy7UIvitzv7G
rloAoJesCMp4Fi6zmv2QcMhc60WqLtfm
=cFkN
-----END PGP SIGNATURE-----

--WA7H3kVYsfCLkbZb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110824195035.GA17489>