|
|
|
| Trouver un PID par mkacho |
mercredi 15 février 2006 à 15:22:39 |
Salut,
Tu peux le lancer en batch dans un terminal et faire top dans le meme terminal. |
Salut,
si tu détaches ton programme de la console, le numéro de Pid est retourné, me semble t'il : ./nomDeProgramme & A plus |
pgrep -l nom_programme
ou ps | grep nom_programme |
|
bash te fournit le PID du processus:
johand@horus:~$ ls -l > /dev/null & [1] 21691 Dans ton code C, tu peux faire appel à getpid man 2 getpid NAME getpid, getppid - get process identification SYNOPSIS #include <sys/types.h> #include <unistd.h> pid_t getpid(void); pid_t getppid(void); DESCRIPTION getpid() returns the process ID of the current process. (This is often used by routines that generate unique temporary file names.) getppid() returns the process ID of the parent of the current process. CONFORMING TO POSIX, 4.3BSD, SVID Gates gave you the windows. GNU gave us the whole house.(Alexandrin) |
| 28/02 11h31 | Trouver PID d'un process par le nom de Tâche | Windows | 28/02 18h54 | 1 |
| 26/03 01h48 | je trouve pas ! | Loisirs/Divertissement | 04/04 18h35 | 7 |
| 25/03 21h21 | où trouver l'UUID d'un CD d'install Ubuntu | Linux/Unix | 25/03 22h48 | 3 |
| 22/03 17h01 | logiciel ne trouve pas | Logiciels/Pilotes | 22/03 17h04 | 2 |