From: David Howells <dhowells@redhat.com>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: Re: thread groups bug?
Date: Thu, 28 Feb 2002 16:28:09 +0000 [thread overview]
Message-ID: <3135.1014913689@warthog.cambridge.redhat.com> (raw)
In-Reply-To: Message from Benjamin LaHaise <bcrl@redhat.com> of "Thu, 28 Feb 2002 10:59:38 EST." <20020228105938.H8011@redhat.com>
Benjamin LaHaise <bcrl@redhat.com> wrote:
> > It seems that the TGID must also be a valid PID so that signal handling
> > will work correctly...
> >
> > This could be solved by making PIDs independent of processes, but that's
> > really not very nice.
>
> Oh, interesting. Note that we already allocate from the pid space for other
> things, so it's entirely doable.
But we still have to be able to send signals to the TGID. If there's a
guaranteed PID of the same value, then that isn't a problem (except at the
moment where multiple independent thread groups of the same TGID can be
constructed).
This could be done by making the PID independent of the process and giving it
an ops table to direct signal handling and to control /proc/<pid> dir lookup.
BTW what other things are PIDs allocated for? I can see that PIDs won't be
allocated if they are in use as PIDs, TGIDs and PGIDs. As far as I can see,
get_pid() is only called by do_fork().
> Another choice would be to simply disallow the thread group leader from
> exec'ing.
Hmmm... Maybe... Return what error, though?
> Linux threads traditionally try to remain as close to process behaviour as
> possible, and allowing an individual thread to exec is very useful, so I'm
> still in favour of allocating a new tgid.
Yes, I agree that letting subsidary threads to escape the group is reasonable,
but the master thread is definitely trickier:-/
As mentioned above, there'd be nothing backing the TGID, so kill() would have
to search a list of thread groups too...
David
next prev parent reply other threads:[~2002-02-28 16:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-28 14:52 thread groups bug? David Howells
2002-02-28 15:18 ` Benjamin LaHaise
2002-02-28 15:36 ` David Howells
2002-02-28 15:59 ` Benjamin LaHaise
2002-02-28 16:28 ` David Howells [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-28 15:09 David Howells
2002-02-28 17:16 ` Linus Torvalds
2002-02-28 21:57 ` David Howells
2002-03-01 0:20 ` Linus Torvalds
2002-03-01 16:24 ` Dave McCracken
2002-03-01 16:38 ` David Howells
2002-03-01 17:01 ` Martin Dalecki
2002-03-01 17:05 ` Dave McCracken
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3135.1014913689@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=bcrl@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox