Anteprima
Vedrai una selezione di 1 pagina su 3
Sistemi operativi - Syscall fork Pag. 1
1 su 3
D/illustrazione/soddisfatti o rimborsati
Disdici quando
vuoi
Acquista con carta
o PayPal
Scarica i documenti
tutte le volte che vuoi
Estratto del documento

fork - create a new process

The Single UNIX ® Specification, Version 2

Copyright © 1997 The Open Group

NAME

fork - create a new process

SYNOPSIS

#include <sys/types.h>
#include <unistd.h>
pid_t fork(void);

DESCRIPTION

The fork() function creates a new process. The new process (child process) is an exact copy of the calling process (parent process) except as detailed below.

The child process has a unique process ID.

The child process ID also does not match any active process group ID.

The child process has a different parent process ID (that is, the process ID of the parent process).

The child process has its own copy of the parent's file descriptors. Each of the child's file descriptors refers to the same open file description with the corresponding file descriptor of the parent.

The child process has its own copy of the parent's open directory streams. Each open directory stream in the child process may share directory stream

positioning with the corresponding directory stream of the parent.

The child process may have its own copy of the parent's message catalogue descriptors.

The child process' values of tms_utime, tms_stime, tms_cutime and tms_cstime are set to 0.

The time left until an alarm clock signal is reset to 0.

All semadj values are cleared.

File locks set by the parent process are not inherited by the child process.

The set of signals pending for the child process is initialised to the empty set.

Interval timers are reset in the child process.

If the Semaphores option is supported, any semaphores that are open in the parent process will also be open in the child process.

If the Process Memory Locking option is supported, the child process does not inherit any address space memory locks established by the parent process via calls to

Dettagli
Publisher
A.A. 2012-2013
3 pagine
SSD Scienze matematiche e informatiche INF/01 Informatica

I contenuti di questa pagina costituiscono rielaborazioni personali del Publisher N. A. di informazioni apprese con la frequenza delle lezioni di Sistemi operativi e studio autonomo di eventuali libri di riferimento in preparazione dell'esame finale o della tesi. Non devono intendersi come materiale ufficiale dell'università Università degli studi di Napoli Federico II o del prof Cotroneo Domenico.