28.11.2014 Views

System call - Processi, thread

System call - Processi, thread

System call - Processi, thread

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

wait<br />

• Rilevazione dello stato: e` necessario conoscere la<br />

rappresentazione di status:<br />

• lo standard Posix.1 prevede delle macro (definite<br />

nell’header file per l’analisi dello stato<br />

di terminazione. In particolare:<br />

•WIFEXITED(status): restituisce vero, se il processo<br />

figlio è terminato volontariamente: in questo caso la<br />

macro WEXITSTATUS(status) restituisce lo stato di<br />

terminazione.<br />

•WIFSIGNALED(status):restituisce vero, se il processo<br />

figlio è terminato involontariamente<br />

• in questo caso la macro WTERMSIG(status) restituisce<br />

il numero dell’interruzione SW che ha causato la<br />

terminazione.<br />

M-fosset - Sistemi Operativi 2004-2005

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!