Re: [PATCH -mm 1/9] unshare system call: system call handler function

From: Serge E. Hallyn
Date: Fri Dec 16 2005 - 09:31:15 EST


Quoting Jamie Lokier (jamie@xxxxxxxxxxxxx):
> Like clone(), unshare() will have to change from year to year, as new
> flags are added. It would be good if the default behaviour of 0 bits
> to unshare() also did the right thing, so that programs compiled in
> 2006 still function as expected in 2010. Hmm, this
> forward-compatibility does not look pretty.

This is a very good point, which I didn't quite appreciate at first.

I suppose it would be a bad idea to define a new set of unshare flags,
and have unshare use UNSH_NS | UNSH_FS ? Then clone() could do the
proper translation from CLONE_* to UNSH_*, and call unshare after the
clone(). It still requires more work as clone() is maintained, but
at least it won't be as confusing as you've shown the current case to
be.

-serge
-
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/