Re: forking a process that has multiple threads

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 08/12/03


Date: Tue, 12 Aug 2003 21:11:06 +0200

phil-news-nospam@ipal.net wrote:
>
> In comp.os.linux.development.system Duke Robillard <duke@io.com> wrote:
> |
> | The LinuxThreads library, which is the most common thing that
> | produces "threads" on GNU/Linux systems, uses a Linux-specific
> | system call similar to exec() called clone(). It creates neither
> | processes nor threads, by the common definitions of those words.
> | One of the regular posters on c.p.t refers to the things it creates
> | as KSEs or "Kernel Schedulable Entities," which is as good a name
> | as any...at least it's accurate.
> |
> | clone() allows the newly created KSE to share some resources
> | the the process that called clone(). Among these resources
> | are heap space, file descriptors, and signal handlers, which
> | makes them look a lot like threads. Process ID isn't one of
> | the things that can be shared, so these KSE's show up in the
> | output of ps, making them look like processes.
>
> But, can they be killed by that PID?

I think it depends on the kernel version. Some recent kernel
versions hide some of the processes by prepending a . to the
directory name in /proc. Maybe the signal semantics have
changed as well. I recall reading about the old semantics to
be broken.

-- 
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use mailto:aaarep@daimi.au.dk
Their business was zero and it was shrinking.


Relevant Pages

  • Re: [RFC][-mm] Memory controller add mm->owner
    ... Paul Menage wrote: ... This will have to be the common case, since you never know what combination of ... At exit time, we need to pay ... Exactly what sequence of clone() calls was used to cause the sharing ...
    (Linux-Kernel)
  • Re: 200 apple II clones confirmed....abbacus clone?
    ... it might have been a blimp in the clone stream i know it was almost ... keyboard many clones of the time had...it may have been simply a more common ...
    (comp.sys.apple2)
  • Re: AspectJ: solution to Javas repetitiveness?
    ... I've never implemented any of these except toString(). ... So if they're not actually common, why should the language designers worry about it? ... clone this object, clone its every field. ...
    (comp.lang.java.programmer)
  • Re: DMA API issues
    ... > Take the simple PLX chip that is pretty common, at least as a clone ... But this *isnt* one of those. ... common architecture thats so close to the existing model support is near ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Here is a case that proves my previous position wrong regurading CLONE_THREAD and CLONE_FILES
    ... > 1) The Linux Kernel does not provide POSIX style thread support. ... > consider how bad native pthread support is in Windows, ... forkand exec(). ... > The real inspired part of clone() is that you get to choose what gets copied ...
    (Linux-Kernel)

Loading