Signal queuing in C

前端 未结 4 1930
南方客
南方客 2020-12-03 00:07

I have a simple program under Linux which sends SIGUSR1 signal to its child process in a cycle. But when I send e.g. 10 signals, sometimes happens, that the child received o

4条回答
  •  不知归路
    2020-12-03 00:19

    If multiple signals of the same type are sent and not handled, they aren't queued. Say the program masks SIGUSR1, calls kill(getpid(), SIGUSR1) 10 times and unmasks SIGUSR1. It will receive SIGUSR1 just once.

提交回复
热议问题