简体   繁体   中英

How to send a signal to a child's child after receive a signal from parent

Background: I am child (A)

Original Code:
Parent-> fork [hv A PID only]
------------1st Child(A)-> fork twice [hv Aa PID and Ab PID]
-------------------->1st Child's Child(Aa) + 2nd Child's Child(Ab)

This time, I would like to send a signal SIGCONT to child's children (Aa+Ab) after receive a signal SIGCONT from parent. What should I do?

create a process group and send a signal to it. See http://linux.die.net/man/2/killpg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM