Manual Page Result
0
Command: pid_block | Section: 2 | Source: Digital UNIX | File: pid_block.2.gz
pid_block(2) System Calls Manual pid_block(2)
NAME
pid_block, pid_unblock - stops (blocks) or resumes (unblocks) the spec-
ified process
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <types.h> #include <sys/time.h>
int pid_block
(struct timeval *tp,
long flags);
int pid_unblock
(pid_t pid
long flags);
PARAMETERS
Specifies the timeout value for the blocked process. If tp is NULL,
the process sleeps until either it receives a signal or it is unblocked
by a pid_unblock. Specifies the process ID of the process to unblock.
Specifies flags that can be passed to the pid_block() and pid_unblock()
functions.
Note
Currently, the only valid value for flags is NULL.
DESCRIPTION
The pid_block() function blocks execution of the process until one of
the following conditions occurs: The process is unblocked by the
pid_unblock() function. A signal is sent to the process. The optional
timeout period expires.
The pid_unblock function forces the specified process, previously sus-
pended via a call to pid_block, to be made runnable.
Unless you are operating with superuser authority, pid_unblock can af-
fect only processes that you own. When operating with superuser au-
thority, you can unblock any process.
NOTES
The pid_block and pid_unblock functions are not portable. The behavior
of these functions when called from a multithreaded application is non-
deterministic.
RETURN VALUES
Upon successful completion, the pid_block() and pid_unblock() functions
return a value of 0. Otherwise, they return a value of -1 and set er-
rno to indicate the error: The pid parameter specified an invalid ad-
dress. The tp parameter specified a time that was too large to be han-
dled, or the pid specified to the pid_unblock function was not found.
The real or saved user ID does not match the real or effective user ID
of the target process or the calling process does not have appropriate
privilege. A signal interrupted the suspended process. System call
timed out.
FILES
/usr/include/sys/time.h
/usr/include/types.h delim off
pid_block(2)