Re: SIGINT Issues with Zeus Migration


Leon Woestenberg
 

Hello Aashik,

I recognize the issue that CTRL-C does not pass from the console, but only with *very* minimal configurations.

How does your local.conf look like, or better yet how can we reproduce your case?

Regards, Leon

On Fri, 25 Sep 2020 at 12:46, Aashik Aswin <thisisaash9698@...> wrote:
Hi Leon, Zoran

I am using Ctrl+C to kill the Ping command.


Thanks.

On Fri, Sep 25, 2020 at 3:56 PM Zoran Stojsavljevic <zoran.stojsavljevic@...> wrote:
Hello Leon,





> Aashik, how are you sending the signal? Using CTRL-C or


> using the "kill" command?





This is a good suggestion for the test. To open another terminal and


issue: kill -SIGINT <ping PID>.





I should add that this MUST work: kill -SIGKILL <ping PID>, since


SIGKILL handler is un-preemptable.





If it does not, something is very wrong... I suggest, Aashik, you


write YOCTO bugzilla for Zeus.





> Zoran, are you suggesting that the program will change the signal


> handler to default even after it has exited, and for the subsequent


> ping command?





Yes, I do. Then, the ping command should be issued again, and my best


guess is, it should terminate the ping process.





Leon, you should try to write another C f-n and to install other


SIGINT handler (replacing SIG_DFL), then test it with my original C:





void  myhandler(int signum) {


        if (SIGINT == signum)


                printf("\nHey, I got SIGINT: %d\n\n",signum);


}





Zoran


_______





On Fri, Sep 25, 2020 at 10:54 AM Leon Woestenberg <leon@...> wrote:


>


> Hi Aashik, Zoran,


>


>


> On Fri, Sep 25, 2020 at 10:02 AM Zoran <zoran.stojsavljevic@...> wrote:


> >


> > > ...that I am not able to send SIGINT to commands such as Ping, tail etc.\


>


> Aashik, how are you sending the signal? Using CTRL-C or using the


> "kill" command?


>


> >


> > Please, do the following: issue in zeus xterm the command: man signal


> > and read it.


> >


> That reads to use sigaction() instead of signal() I would assume.


>


> > Then execute the following code (ad-hoc from the top of my head):


> > <...>


> > This program serves the double purpose:


> > [1] Gives you the address of the old SIGINT handler which was executed


> > prior execution of this code;


> > [2] After execution, repeat the routine (ping) and see if <ctrl c>


> > terminates the ping process.


> >


>


> Zoran, are you suggesting that program will change the signal handler


> to default even after it has exited, and for the subsequent ping


> command?


>


> Regards,


>


> Leon.




--
-- 
Leon Woestenberg
leon@...
T: +31 40 711 42 76
M: +31 6 472 30 372

Sidebranch Embedded Systems
Eindhoven, The Netherlands
http://www.sidebranch.com

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.