Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] How to ignore a signal?
From: Boris (boriss_at_[hidden])
Date: 2008-09-18 17:17:58


On Thu, 18 Sep 2008 22:47:22 +0200, Gennaidy Rozental <rogeeff_at_[hidden]>
wrote:

> Boris <boriss <at> web.de> writes:
>
>>
>> I've a test case which receives the SIGCHLD signal on Solaris.
>> Boost.Test
>> catches it and prints an error message although in that test case
>> SIGCHLD
>> s perfectly fine. How do I make Boost.Test ignore this signal? I found
>
> What error code does it produce?

child has exited; pid: 0; uid: 28570; exit value: 0

> You can always use --catch_system_errors=no

I assume all signals are then ignored? As I'm also afraid of telling other
developers again and again to use certain command line options I'd prefer
to use a preprocessor directive.

> In trunk I checked in compile time switch that affects handling child
> processes
> with non-zero return codes

I temporarily hardcoded in boost/test/impl/execution_monitor.ipp:

m_CHLD_action( SIGCHLD, false, attach_dbg, alt_stack )

That works. If the macro BOOST_TEST_IGNORE_NON_ZERO_CHILD_CODE does the
same it should be all right. :)

Boris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net