Re: Who changed /proc/<pid>/ in 2.6.0-test5-bk9?

From: bill davidsen
Date: Thu Oct 09 2003 - 13:53:33 EST


In article <3F846183.9010205@xxxxxxxxxx>,
Ulrich Drepper <drepper@xxxxxxxxxx> wrote:

| The kernel thread functionality is not used 1-to-1 in the userlevel
| interfaces of the pthread library. One very specific combination of all
| the CLONE_* flags is used in libpthread. Other users of the kernel
| might use other combinations and they won't implement pthreads. That
| is perfectly fine and if it fits your bill, do it. But none of this
| ever has any influence on the pthread interface. The properties like
| sharing of file descriptors are guaranteed.

I confess that my first reaction to this topic was that I could add an
attribute when starting a thread, and then use existing code (pthreads)
and just take advantage of the non-fd-sharing.

Pseudo code: (some of the if's are clearly ifdef)

if linux add_noshare_to_attributes
for (;;) {
fd = listen();
start_thread(fd)
if linux clode fd
}

Clearly that isn't what's needed, I would probably define a
start_service_and_close_fd_ifUcan macro/procedure. When this is stable
and 2.6 is closer to production quality I will probably modify a few
applications to see what benefits might be available.
--
bill davidsen <davidsen@xxxxxxx>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/