Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pid_block(2) [osf1 man page]

pid_block(2)							System Calls Manual						      pid_block(2)

NAME
pid_block, pid_unblock - stops (blocks) or resumes (unblocks) the specified process SYNOPSIS
#include <types.h> #include <sys/time.h> int pid_block( struct timeval *tp, long flags ); int pid_unblock( pid_t pid, long flags ); LIBRARY
Standard C Library (libc) 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 suspended via a call to pid_block, to be made runnable. Unless you are operating with superuser authority, pid_unblock can affect only processes that you own. When operating with superuser authority, 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 nondeterministic. 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 errno to indicate the error: The pid parameter specified an invalid address. The tp parameter specified a time that was too large to be handled, 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
pid_block(2)

Check Out this Related Man Page

getpgid(2)							System Calls Manual							getpgid(2)

NAME
getpgid - Gets process group ID LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/types.h> #include <unistd.h> pid_t getpgid( pid_t pid); PARAMETERS
Specifies the process ID of the target process; zero implies the calling process. DESCRIPTION
The getpgid() function returns the process group ID of the process specified by the process ID pid. Specifying a pid of 0 (zero) returns the process group ID of the calling process. RETURN VALUES
The getpgid() function returns the process group ID of the process specified. If there was an error, a value of -1 is returned and errno is set to indicate the error. ERRORS
If any of the following conditions occurs, the getpgid() function sets errno to the corresponding value: The specified process is not in the same session as the calling process, and the calling process lacks sufficient privilege to read the specified process. As released, Tru64 UNIX does not check the privilege. No process has been found that has a process ID identical to that specified by the pid parameter. RELATED INFORMATION
Functions: exec(2), fork(2), setpgid(2) delim off getpgid(2)
Man Page