2004-01-17 02:17:32

by Andries E. Brouwer

[permalink] [raw]
Subject: CLONE_DETACHED

My current version of the clone.2 manual page says

CLONE_THREAD
(Linux 2.4 onwards) If CLONE_THREAD is set, the
child is placed in the same thread group as the
calling process. Now in 2.6 also the meaningless
CLONE_DETACHED (introduced in 2.5.32) must be set.

I wonder whether it is too late to remove CLONE_DETACHED entirely.
There are precisely two occurrences: the definition and the check
that it is set when CLONE_THREAD is set. Seems fairly useless.

Andries


2004-01-17 02:26:26

by Andrew Morton

[permalink] [raw]
Subject: Re: CLONE_DETACHED

[email protected] wrote:
>
> My current version of the clone.2 manual page says
>
> CLONE_THREAD
> (Linux 2.4 onwards) If CLONE_THREAD is set, the
> child is placed in the same thread group as the
> calling process. Now in 2.6 also the meaningless
> CLONE_DETACHED (introduced in 2.5.32) must be set.
>
> I wonder whether it is too late to remove CLONE_DETACHED entirely.
> There are precisely two occurrences: the definition and the check
> that it is set when CLONE_THREAD is set. Seems fairly useless.
>

Changelog says:

ChangeSet 1.1150 2003/08/14 11:11:39 [email protected]
Mark CLONE_DETACHED as being irrelevant: it must match CLONE_THREAD.

CLONE_THREAD without CLONE_DETACHED will now return -EINVAL, and
for a while we will warn about anything that uses it (there are no
known users, but this will help pinpoint any problems if somebody
used to care about the invalid combination).


It has been five months; I'd say we could lose it now. Linus?