lkml.org 
[lkml]   [1996]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: proc fs and shared pids
Date
From
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


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.087 / U:2.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site