That is not part of POSIX, those are only present as you listed on linux systems - some other systems have a /proc with different things in it (sometimes stuff that's symbolic links on linux will be hardlinks, textfiles on linux will be binary, or different files with different information) or none at all
POSIX Funzioni
Vedere anche:
The section about Process Control Functions maybe of interest for you.
Indice dei contenuti
- posix_access — Determine accessibility of a file
- posix_ctermid — Restituisce il percorso del terminale
- posix_errno — Alias di posix_get_last_error
- posix_get_last_error — Recupera il numero di errore dell'ultima funzione posix non riuscita
- posix_getcwd — Percorso della directory corrente
- posix_getegid — Restituisce l'ID del gruppo per il processo corrente
- posix_geteuid — Restituisce l'ID dell'utente per il processo corrente
- posix_getgid — Restituisce il reale ID del gruppo per il processo corrente
- posix_getgrgid — Restituisce informazioni su un gruppo dato il suo ID
- posix_getgrnam — Restituisce le informazioni di un gruppo dato il nome
- posix_getgroups — Restituisce i gruppi per il processo corrente
- posix_getlogin — Restituisce il nome dell'utente
- posix_getpgid — Restituisce l'id del gruppo del processo per il controllo dei job
- posix_getpgrp — Restituisce l'identificatore di gruppo per il processo corrente
- posix_getpid — Restituisce l'ID per il processo corrente
- posix_getppid — Restituisce l'ID del processo genitore
- posix_getpwnam — Restituisce informazioni su un utente dato il nome
- posix_getpwuid — Restituisce le informazioni di un utente dato il suo ID
- posix_getrlimit — Restituisce informazioni sui limiti delle risorse del sistema
- posix_getsid — Restituisce il sid corrente per un processo
- posix_getuid — Restituisce il reale ID dell'utente per il processo corrente
- posix_initgroups — Calculate the group access list
- posix_isatty — Determina se il decrittore di file è un terminale
- posix_kill — Invia un segnale ad un processo
- posix_mkfifo — Crea un file speciale di tipo fifo (una pipe nominata)
- posix_mknod — Create a special or ordinary file (POSIX.1)
- posix_setegid — Imposta l'effettivo GID per il processo corrente
- posix_seteuid — Imposta l'effettivo UID del processo corrente
- posix_setgid — Imposta il GID per il processo corrente
- posix_setpgid — Imposta l'id di gruppo per il controllo dei job
- posix_setsid — Rende il processo corrente leader di sessione
- posix_setuid — Imposta l'UID per il processo corrente
- posix_strerror — Recupera il messaggio di errore di un dato codice di errore
- posix_times — Restituisce il tempo del processo
- posix_ttyname — Determina il nome del device per il terminale
- posix_uname — Restituisce il nome del sistema
random832 at fastmail dot fm ¶
5 years ago
roberto at spadim dot com dot br ¶
6 years ago
don't forget that in posix systems you can use /proc/$process_id/
files:
auxv
cmdline
cwd
environ
exe
fd
maps
mem
mounts
root
stat
statm
status
task
wchan
with it you can make somethings like:
$PPID=getmypid();
$pid=pcntl_fork();
if ($pid==0){
while(1){
if (strpos(file_get_contents("/proc/$PPID/cmdline"),'php')===false) echo "parent pid die";
}
}else{
// forked
}
with this you can use some libs that block signal or some bad signal handling or zombies process or anything you can think :)
