Messages in this thread |  | | Subject | Re: proc fs and shared pids | Date | Tue, 30 Jul 1996 22:19:29 -0400 (EDT) | From | "Lex Spoon" <> |
| |
Michiel Boland wrote: > > >Kernelthreads? They dont shre the same pid. Userthreads are not visible to > >the kernel at all and therefore there is no proc entry. > > As I understand it, kernel threads are implemented in linux with > clone(), and hence they *can* share the same PID. Whether this > is a good idea is perhaps another matter. > > Just did some experimenting with clone() and the CLONE_PID flag. > > This creates a new process with the same process ID as the original > process. The proc fs has two directory entries for this with the same > i-number. (!) So I guess the status of one of the two processes can never > be retrieved. >
And /proc is not the only problem! What about kill()? waitpid()?
It's NICE to be able to identify a process by just knowing its pid; are there any real uses for two processes having the same pid?
Lex
|  |