Commit c88a54b1 authored by Florent Fourcot's avatar Florent Fourcot Committed by Peter V. Saveliev

netns: add documentation on how to go back on default netns

parent e7810d93
......@@ -224,6 +224,11 @@ def setns(netns, flags=os.O_CREAT, libc=None):
- O_CREAT -- create netns, if doesn't exist
- O_CREAT | O_EXCL -- create only if doesn't exist
Note that "main" netns as no name. But you can access it with::
setns('foo') # move to netns foo
setns('/proc/1/ns/net') # go back to default netns
Changed in 0.5.1: the routine closes the ns fd if it's
not provided via arguments.
'''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment