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

bill davidsen
2003-10-09T18:52:44Z

In article <3F846183.9010205@redhat.com>,
Ulrich Drepper <drepper@redhat.com> 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@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.