Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.sao.ru/hq/sts/linux/book/c_marshall/section2_18_4.html
Дата изменения: Unknown Дата индексирования: Sat Sep 11 19:54:13 2010 Кодировка: Поисковые слова: massive stars |
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.