POSIX functions
POSIX
Needs to be written ASAP.
posix_kill
Send a signal to a process
Description
bool posix_kill
int pid
int sig
Send the signal sig to the process
with the process identifier pid.
Returns FALSE, if unable to send the signal, TRUE otherwise.
See also the kill(2) manual page of your POSIX system, which
contains additional information about negative process
identifiers, the special pid 0, the special pid -1, and the
signal number 0.
posix_getpid
Return the current process identifier
Description
int posix_getpid
void
Return the process identifier of the current process.
posix_getppid
Return the parent process identifier
Description
int posix_getppid
void
Return the process identifier of parent process of the current
process.
posix_getuid
Return the real user ID of the current process
Description
int posix_getuid
void
Return the numeric real user ID of the current process. See also
posix_getpwuid for information on how to
convert this into a useable username.
posix_geteuid
Return the effective user ID of the current process
Description
int posix_geteuid
void
Return the numeric effective user ID of the current process. See
also posix_getpwuid for information on how
to convert this into a useable username.
posix_getgid
Return the real group ID of the current process
Description
int posix_getgid
void
Return the numeric real group ID of the current process. See also
posix_getgrgid for information on how to
convert this into a useable group name.
posix_getegid
Return the effective group ID of the current process
Description
int posix_getegid
void
Return the numeric effective group ID of the current process. See
also posix_getgrgid for information on how
to convert this into a useable group name.
posix_setuid
Set the effective UID of the current process
Description
bool posix_setuid
int uid
Set the real user ID of the current process. This is a privileged
function and you need appropriate privileges (usually root) on
your system to be able to perform this function.
Returns TRUE on success, FALSE otherwise. See also
posix_setgid.
posix_setgid
Set the effective GID of the current process
Description
bool posix_setgid
int gid
Set the real group ID of the current process. This is a
privileged function and you need appropriate privileges (usually
root) on your system to be able to perform this function. The
appropriate order of function calls is
posix_setgid first,
posix_setuid last.
Returns TRUE on success, FALSE otherwise.
posix_getgroups
Return the group set of the current process
Description
array posix_getgroups
void
Returns an array of integers containing the numeric group ids of
the group set of the current process. See also
posix_getgrgid for information on how to
convert this into useable group names.
posix_getlogin
Return login name
Description
string posix_getlogin
void
Returns the login name of the user owning the current process.
See posix_getpwnam for information how to
get more information about this user.
posix_getpgrp
Return the current process group identifier
Description
int posix_getpgrp
void
Return the process group identifier of the current process. See
POSIX.1 and the getpgrp(2) manual page on your POSIX system for
more information on process groups.
posix_setsid
Make the current process a session leader
Description
int posix_setsid
void
Make the current process a session leader. See POSIX.1 and
the setsid(2) manual page on your POSIX system for more
informations on process groups and job control. Returns
the session id.
posix_setpgid
set process group id for job control
Description
int posix_setpgid
int pid
int pgid
Let the process pid join the process
group pgid. See POSIX.1 and
the setsid(2) manual page on your POSIX system for more
informations on process groups and job control. Returns
TRUE on success, FALSE otherwise.
posix_getpgid
Get process group id for job control
Description
int posix_getpgid
int pid
Returns the process group identifier of the process
pid.
This is not a POSIX function, but is common on BSD and System V
systems. If your system does not support this function at system
level, this PHP function will always return FALSE.
posix_setsid
Get the current sid of the process
Description
int posix_getsid
int pid
Return the sid of the process pid.
If pid is 0, the sid of the
current process is returned.
This is not a POSIX function, but is common on System V
systems. If your system does not support this function at system
level, this PHP function will always return FALSE.
posix_uname
Get system name
Description
array posix_uname
void
Returns a hash of strings with information about the
system. The indices of the hash are
sysname - operating system name (e.g. Linux)
nodename - system name (e.g. valiant)
release - operating system release (e.g. 2.2.10)
version - operating system version (e.g. #4 Tue Jul 20
17:01:36 MEST 1999)
machine - system architecture (e.g. i586)
Posix requires that you must not make any assumptions about the
format of the values, e.g. you cannot rely on three digit version
numbers or anything else returned by this function.
posix_times
Get process times
Description
array posix_times
void
Returns a hash of strings with information about the
current process CPU usage. The indices of the hash are
ticks - the number of clock ticks that have elapsed since
reboot.
utime - user time used by the current process.
stime - system time used by the current process.
cutime - user time used by current process and children.
cstime - system time used by current process and children.
posix_ctermid
Get path name of controlling terminal
Description
string posix_ctermid
void
Needs to be written.
posix_ttyname
Determine terminal device name
Description
string posix_ttyname
int fd
Needs to be written.
posix_isatty
Determine if a file descriptor is an interactive terminal
Description
bool posix_isatty
int fd
Needs to be written.
posix_getcwd
Pathname of current directory
Description
string posix_getcwd
void
Needs to be written ASAP.
posix_mkfifo
Create a fifo special file (a named pipe)
Description
bool posix_getcwd
string pathname
int mode
Needs to be written ASAP..
posix_getgrnam
Return info about a group by name
Description
array posix_getgrnam
string name
Needs to be written.
posix_getgrgid
Return info about a group by group id
Description
array posix_getgrgid
int gid
Needs to be written.
posix_getpwnam
Return info about a user by name
Description
array posix_getpwnam
string name
Needs to be written ASAP.
posix_getpwuid
Return info about a user by user id
Description
array posix_getpwuid
int uid
Needs to be written ASAP.
posix_getrlimit
Return info about system ressource limits
Description
array posix_getrlimit
void
Needs to be written ASAP.