Email List: Xaustin-review-lX
[All Lists]

Bug in TC2-d2 killpg()

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Bug in TC2-d2 killpg()
From: yyyyyyyyy@xxxxxxx
Date: Fri, 25 Jul 2003 12:40:31 +0100 (BST)
        Bug report from : Michael Kerrisk , self

(Note that the reply-to line automatically redirects 
to yyyyyyyyyyyyyy@xxxxxxxxxxxxx for further discussion on bug reports)

@ page 1 line 22253 section killpg() comment {example for killpg()}

Problem:

This is an EXAMPLE for the killpg() man page.  Line number 
references are to TC1.  


Action:

Change

"None"

to the following:

[Summary] Sending a signal to all other members of a process group

The following example shows how the calling process could send a 
signal to all other members of its process group.  To prevent 
itself from receiving the signal it first makes itself immune to
the signal by ignoring it.

#include <signal.h>
#include <unistd.h>
...
    if (signal(SIGUSR1, SIG_IGN) == SIG_ERR)
        /* Handle error */;

    if (killpg(getpgrp(), SIGUSR1) == -1)
        /* Handle error */;

<Prev in Thread] Current Thread [Next in Thread>
  • Bug in TC2-d2 killpg(), mtk-lists <=