Re: [patch] khttpd doesn't detach from the files of its parent

From: Alexander Viro (viro@math.psu.edu)
Date: Wed Oct 18 2000 - 13:55:48 EST


On Wed, 18 Oct 2000, Alessandro Rubini wrote:

>
> > put_files_struct() is a destructor, so it won't help here. The following
> > patch may be of use [...] It's "create an empty
> > files_struct and replace the task->files with it" - thing we can't do via
> > clone() and may want to (khttpd does).
>
> Sorry, what's wrong with just closing the files? It's much
> easier.

Really? You copy all references to new files_struct upon clone(), then
destroy them on close_files() and you claim that it's easier than
clone() with CLONE_FILES (get an extra reference) followed by allocation
of new files_struct (as you would do in your variant anyway) and dropping
aforementioned reference?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 23 2000 - 21:00:13 EST