Re: SIGINT Issues with Zeus Migration


Zoran
 

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@sidebranch.com> wrote:

Hi Aashik, Zoran,


On Fri, Sep 25, 2020 at 10:02 AM Zoran <zoran.stojsavljevic@gmail.com> 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.

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