samedi 25 avril 2015

For Linux, how can I kill all processes in a session (with same SID) using system calls?

I am trying to figure how to kill all processses in a session (with the same SID) using system calls with C. I am not interested in to just kill all with a specific PGID since not all processes I am interested about does not have the same PGID, but they have the same SID.

My research have only found this, there Graeme made an excellent answer for scripts: http://ift.tt/1I8K5WI

I would be pleased to get an answer for how it would be possible to kill all direct descendant children and even more pleased how I could kill all children within the session.

Or is what I am asking possible? I am not intrested in a solution there I am simply listing the PIDs of the parents descendant.

Aucun commentaire:

Enregistrer un commentaire