BSDPROC(2) — HP-UX
Series 300 Only
NAME
killpg, sigvec, signal − 4.2 BSD-compatible process control facilities
SYNOPSIS
int killpg(pgrp, sig)
int pgrp, sig;
#include <signal.h>
int sigvec(sig, vec, ovec)
int sig;
struct sigvec *vec, *ovec;
void (*signal(sig, func))()
int sig;
void (*func)();
DESCRIPTION
These calls simulate (and are provided for backward compatibility with) functions of the same name in the 4.2 Berkeley Software Distribution.
Killpg is equivalent to the system call kill(-pgrp, sig) (see kill(2)).
Sigvec is equivalent to the system call sigvector(sig, vec, ovec) (see sigvector(2)), except for the following:
The value SIGCHLD can be used for sig to specify what to do when the SIGCLD signal is received. When SIGCHLD or SIGCLD is used and vec specifies a catching function, the routine acts as if the SV_BSDSIG flag were included in the sv_flags field of vec.
The name sv_onstack can be used as a synonym for the name of the sv_flags field of vec and ovec.
If vec is not a null pointer and the value of (vec−>sv_flags & 1) is "true", the routine acts as if the SV_ONSTACK flag were set.
If ovec is not a null pointer, the flag word returned in ovec−>sv_flags (and therefore the value of ovec−>sv_onstack) will be equal to 1 if the system was reserving space for processing of that signal because of a call to sigspace(2), and 0 if not. The SV_BSDSIG bit in the value placed in ovec−>sv_flags is always clear.
If the reception of a caught signal occurs during certain system calls, the call will always be restarted, regardless of the return value from a catching function installed with sigvec(). The affected calls are wait(2), semop(2), msgsnd(2), msgrcv(2), and read(2) or write(2) on a slow device (such as a terminal or pipe, but not a file). Other interrupted system calls are not restarted.
This version of signal has the same effect as sigvec(sig, vec, ovec), where vec−>sv_handler is equal to func, vec−>sv_mask is equal to 0, and vec−>sv_flags is equal to 0. Signal returns the value that would be stored in ovec−>sv_handler if the equivalent sigvec call would have succeeded. Otherwise, signal returns −1 and errno is set to indicate the reason as it would have been set by the equivalent call to sigvec.
The BSD sigstack() function is currently not provided; however, it may be possible to achieve the desired result with sigspace(2).
These functions can be linked into a program by giving the -lBSD option to ld(1).
WARNINGS
While the 4.3 BSD release defined extensions to some of the interfaces described here, only the 4.2 BSD interfaces are emulated by this package.
AUTHOR
Bsdproc was developed by HP and the University of California, Berkeley.
SEE ALSO
kill(2), getpid(2), setpgrp(2), signal(2), sigvector(2).
Hewlett-Packard Company — May 11, 2021