Linux Test Project
 help / color / mirror / Atom feed
From: Han Pingtian <hanpt@linux.vnet.ibm.com>
To: ltp@lists.linux.it
Subject: [LTP] question about signal handling in tst_sig()
Date: Tue, 15 Mar 2016 09:28:20 +0800	[thread overview]
Message-ID: <20160315012820.GB3579@localhost.localdomain> (raw)
In-Reply-To: <20160314134321.GD600@rei.lan>

On Mon, Mar 14, 2016 at 02:43:21PM +0100, Cyril Hrubis wrote:
> Hi!
> > > Looks like in tst_sig(), if _SC_SIGRT_MIN defined, all realtime signals
> > > won't be set an handler:
> > > 
> > > 125 #ifdef _SC_SIGRT_MIN
> > > 126                 if (sig >= sigrtmin && sig <= sigrtmax)
> > > 127                         continue;
> > > 128 #endif
> > > 
> > > but, if it wasn't defined, then all realtime signals will be set an
> > > handler:
> > > 
> > > 134 #if !defined(_SC_SIGRT_MIN) && defined(__SIGRTMIN) &&
> > > defined(__SIGRTMAX)
> > > 135                         /* Ignore all real-time signals */
> > > 136                 case __SIGRTMIN:
> > > 137                 case __SIGRTMIN + 1:
> > > ...
> 
> And also there is a break down after the long list of cases.
> 
> 
> So it looks like:
> 
> * if _SC_SIGRT_MIN is defined we have a POSIX compilant system
>   and we skip realtime signals in the if at line 125.
> 
> * Otherwise if system is not POSIX compilant but __SIGRTMIN and
>   __SIGRTMAX is defined, we skip them in the hack in the switch()
> 
Thanks so much, I just noticed that there is a "break;" at line 206 ...


      reply	other threads:[~2016-03-15  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14  8:19 [LTP] question about signal handling in tst_sig() Han Pingtian
2016-03-14 13:28 ` Cyril Hrubis
2016-03-14 13:43   ` Cyril Hrubis
2016-03-15  1:28     ` Han Pingtian [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160315012820.GB3579@localhost.localdomain \
    --to=hanpt@linux.vnet.ibm.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox