Adds forkexec library that supports user namespaces in Go.

This PR adds a library that could be used to clone into user namespaces and write uid/gid mappings.
(This is based on joint effort between me and crosbymichael).

Docker-DCO-1.1-Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
I will fix it. Thanks for reviewing!

Sent from my iPhone

> On Aug 11, 2014, at 3:25 PM, Brandon Philips <notifications@github.com> wrote:
> 
> In forkexec/forkexec.go:
> 
> > +// These functions are defined in forkexec.c
> > +func BeforeFork()
> > +func AfterFork()
> > +
> > +var zeroProcAttr ProcAttr
> > +var zeroSysProcAttr SysProcAttr
> > +
> > +// This is similar to the standard go library implementation of forkExec with the addition
> > +// of capability to write UID/GID mappings for user namespaces.
> > +func ForkExecNew(argv0 string, argv []string, attr *ProcAttr, uidMappings, gidMappings []IdMap) (pid int, err error) {
> > +	var p [2]int
> > +	var n int
> > +	var err1 Errno
> > +	var wstatus WaitStatus
> > +
> > +	sys := attr.Sys
> isn't this a potentially unsafe ref if attr is nil?
> 
> —
> Reply to this email directly or view it on GitHub.