28.11.2014 Views

System call - Processi, thread

System call - Processi, thread

System call - Processi, thread

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

wait<br />

Effetti della system <strong>call</strong>wait(&status):<br />

• il processo che la chiama può avere figli in<br />

esecuzione:<br />

» se tutti i figli non sono ancora terminati, il processo si<br />

sospende in attesa della terminazione del primo di<br />

essi<br />

» se almeno un figlio è già terminato ed il suo stato non<br />

è stato ancora rilevato (cioè è in stato zombie), la<br />

wait ritorna immediatamente con il suo stato di<br />

terminazione (nella variabile status)<br />

» se non esiste neanche un figlio, la wait non è<br />

sospensiva e ritorna un codice di errore (valore<br />

ritornato < 0).<br />

M-fosset - Sistemi Operativi 2004-2005

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

Saved successfully!

Ooh no, something went wrong!