I have a main in which 2 signals SIGUSR1 & SIGUSR2 are being sent using kill() to children pid1 and pid2. The signals are sent one after the other:
kill(pid1, SIGUSR1);
kill(pid2, SIGUSR2);
Using code below does not work:
signal(SIGUSR1, handler);
signal(SIGUSR2, handler);
How can I distinguish which signal was generated in pid1 and pid2?
Thanks.
Aucun commentaire:
Enregistrer un commentaire