|
WORD Pgetpid() | Description: returns the PID of the calling process.
Opcode: 267 (0x010b)
Availability: If the MiNT cookie is present.
Binding: move.w #$010b,-(sp) trap #1 addq.l #2,sp Return value: The WORD returned contains the Process IDentifier (pid) of the calling process. This PID is unique and uniquely identifies the process among other processes within the system.
Definition:A PID is dynamically assigned to a process when it is created. You should make no assumption on the PID a process may have. For the kernel, the PID is a WORD but when you program in C, you should use the pid_t type, which complies with the POSIX standard. The FreeMiNT kernel's PID is always 0. The PID is useful when it is important to identify a process among others in the system. Knowing the PID of a program, it is possible to do a lot of things: send it a signal with Psignal(), look for its name in /proc by searching with a "*.xxx" mask (xxx is the PID of the program which name we wanna know), etc.
mailto: Panzano
HTTP:
See Also: Nothing |
Thanks for your GEMTOS visit!!!
(C) 2000 Gemtos.free.fr. All rights reserved by the authors.
|