Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Jan 2013 11:22:53 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Daniel Eischen <deischen@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, Richard Sharpe <rsharpe@richardsharpe.com>
Subject:   Re: Is it possible to block pending queued RealTime signals (AIO originating)?
Message-ID:  <50ECE28D.4080308@freebsd.org>
In-Reply-To: <Pine.GSO.4.64.1301082208560.19271@sea.ntplx.net>
References:  <1357608470.6752.22.camel@localhost.localdomain> <50EB888A.2030802@freebsd.org> <1357626838.6752.27.camel@localhost.localdomain> <50EBC480.8000306@freebsd.org> <1357661646.6752.30.camel@localhost.localdomain> <1357686894.6752.37.camel@localhost.localdomain> <Pine.GSO.4.64.1301082208560.19271@sea.ntplx.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2013/01/09 11:14, Daniel Eischen wrote:
> On Tue, 8 Jan 2013, Richard Sharpe wrote:
>
>> [ ... ]
>>
>> Well, it turns out that your suggestion was correct.
>>
>> I did some more searching and found another similar suggestion, so I
>> gave it a whirl, and it works.
>>
>> Now, my problem is that Jeremy Allison thinks that it is a fugly hack.
>> This means that I will probably have big problems getting a patch for
>> this into Samba.
>
> I don't understand why JA thinks this is a hack.  Their current
> method doesn't work, or at least isn't portable.  I've tried this
> on Solaris 10, and it works just as it does in FreeBSD.  Test
> program included after signature.
>
>    $ ./test_sigprocmask
>    Sending signal 16
>    Got signal 16, blocked: true
>    Blocking signal 16 using method 0
>    Handled signal 16, blocked: false
>
>    Sending signal 16
>    Got signal 16, blocked: true
>    Blocking signal 16 using method 1
>    Handled signal 16, blocked: true
>

Yeah, people think that signal handler is normal code, this is a
misunderstanding, in fact, it really works like an interrupt service 
routine.





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