Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://jet.sao.ru/hq/sts/linux/book/c_marshall/section2_18_4.html
Дата изменения: Unknown Дата индексирования: Tue Oct 2 09:14:13 2012 Кодировка: Поисковые слова: carl sagan |
A process is basically a single running program. It may be a ``system'' program (e.g login, update, csh) or program initiated by the user (textedit, dbxtool or a user written one).
When UNIX runs a process it gives each process a unique number - a process ID, pid.
The UNIX command ps will list all current processes running on your machine and will list the pid.
The C function int getpid() will return the pid of process that called this function.
A program usually runs as a single process. However later we will see how we can make programs run as several separate communicating processes.