Re: [Quickfix-users] ThreadedSocketInitiator/Acceptor + Application - occasional socket errors
Brought to you by:
orenmnero
From: Marcin G. <mar...@ar...> - 2013-04-14 16:34:13
|
Hi Mike, it took a while but thanks a lot! In our case SIGPROF was the case. M. ----- Oryginalna wiadomość ----- Od: "Mike Gatny" <mg...@co...> Do: "Marcin Giedz" <mar...@ar...> DW: qui...@li... Wysłane: wtorek, 26 marzec 2013 20:50:17 Temat: Re: [Quickfix-users] ThreadedSocketInitiator/Acceptor + Application - occasional socket errors What signal this can be? I did simple tests with such sigaction: Maybe SIGALRM, SIGPIPE? I'm not sure that sigaction is sufficient to solve this. You need to block all signals before starting QF or any other threads -- I usually do something like this right away in main(): <blockquote> sigset_t blockSigs; sigemptyset(&blockSigs); sigaddset(&blockSigs, SIGINT); sigaddset(&blockSigs, SIGALRM); sigaddset(&blockSigs, SIGTERM); sigaddset(&blockSigs, SIGPIPE); int ret = pthread_sigmask(SIG_BLOCK, &blockSigs, 0); </blockquote> ...then spawn a signal-catching thread that calls sigwait() for the sigset I want to handle. -- Mike Gatny Connamara Systems, LLC -- Pozdrawiam Marcin Giedz Wiceprezes Zarządu ARISE Sp. z o.o. mob. +48 502 537 157 mail: mar...@ar... Al. Solidarności 117 00-140 Warszawa tel. +48 (22) 440 56 20 fax +48 (22) 440 56 22 http://www.arise.pl ARISE Sp. z o.o. z siedzibą w Warszawie, Al. Solidarności 117, 00-140 Warszawa, zarejestrowana przez Sąd Rejonowy dla m. st. Warszawy w Warszawie XII Wydział Gospodarczy Krajowego Rejestru Sądowego pod nr KRS 0000316860; REGON 141595449; NIP 527-259-06-10; z pokrytym w całości kapitałem zakładowym wynoszącym 250,000.00 zł. |