OpenVAS Scanner  5.1.3
sighand.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void sighand_chld ()
 
void sighand_segv ()
 
void let_em_die (int pid)
 
void make_em_die (int sig)
 

Variables

void(*)(int) openvas_signal (int signum, void(*handler)(int))
 

Function Documentation

◆ let_em_die()

void let_em_die ( int  pid)

Definition at line 44 of file sighand.c.

45 {
46  int status;
47 
48  waitpid (pid, &status, WNOHANG);
49 }

Referenced by make_em_die().

Here is the caller graph for this function:

◆ make_em_die()

void make_em_die ( int  sig)

Definition at line 53 of file sighand.c.

54 {
55  /* number of times, the sig is sent at most */
56  int n = 3;
57 
58  /* leave if we are session leader */
59  if (getpgrp () != getpid ())
60  return;
61 
62  /* quickly send signals and check the result */
63  if (kill (0, sig) < 0)
64  return;
65  let_em_die (0);
66  if (kill (0, 0) < 0)
67  return;
68 
69  do
70  {
71  /* send the signal to everybody in the group */
72  if (kill (0, sig) < 0)
73  return;
74  sleep (1);
75  /* do not leave a zombie, hanging around if possible */
76  let_em_die (0);
77  }
78  while (--n > 0);
79 
80  if (kill (0, 0) < 0)
81  return;
82 
83  kill (0, SIGKILL);
84  sleep (1);
85  let_em_die (0);
86 }
void let_em_die(int pid)
Definition: sighand.c:44

References let_em_die().

Here is the call graph for this function:

◆ sighand_chld()

void sighand_chld ( )

◆ sighand_segv()

void sighand_segv ( )

Variable Documentation

◆ openvas_signal

void(*)(int) openvas_signal(int signum, void(*handler)(int))

Definition at line 34 of file sighand.h.