Open o11c opened 2 years ago
This is quite a bit faster than checking /proc (~70x in my test env), but I'm a bit concerned about the long-term stability of this approach:
... In particular, as at kernel 3.8, unshare() does not
implement flags that reverse the effects of CLONE_SIGHAND,
CLONE_THREAD, or CLONE_VM. Such functionality may be added in
the future, if required.
So it'll be fine up until the point at which some smartarse actually implements the functionality the unshare
call is asking for...
From the man page
unshare(2)
: