From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: =?utf-8?q?Re=3A_rt=5Ftask=5Funblock=28=29_POSIX_alternative?= Date: Thu, 09 Apr 2020 20:10:57 +0200 From: =?utf-8?q?Petr_=c4=8cervenka?= References: <20200407154117.5D7D71C2@centrum.cz>, , <20200407171816.E0B3979D@centrum.cz>, , <20200408114406.6119E0D9@centrum.cz>, , <20200409170009.5B0DAA77@centrum.cz> In-Reply-To: MIME-Version: 1.0 Message-Id: <20200409201057.74CB5ED0@centrum.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?q?Richard_Weinberger?= Cc: Jan Kiszka , Xenomai > Don't use signal(). > Use sigaction() and *don't* set SA_RESTART. Maybe read() is always restar= ted... =C2=A0 Thank you for trying to help me. But with the sigaction (without SA_RESTART) the behavior is completely the = same: Only Ctrl+C or kill(0, SIGINT) are able to invoke the signalHandler.The rea= d() is not interrupted (maybe syscall restart in some inner cycle).Example = of the signal handler setup: =C2=A0=C2=A0=C2=A0 // Setup signal handler =C2=A0=C2=A0=C2=A0 struct sigaction act; =C2=A0=C2=A0=C2=A0 memset(&act, 0, sizeof (act)); =C2=A0=C2=A0=C2=A0 act.sa_handler =3D signalHandler; =C2=A0=C2=A0=C2=A0 sigaction(SIGINT, &act, NULL); =C2=A0=C2=A0=C2=A0 sigaction(SIGTERM, &act, NULL); =C2=A0 Petr