Re: [go-nuts] EAGAIN from Run is an os.PathError?

2020-03-28 Thread Ian Lance Taylor
On Sat, Mar 28, 2020 at 8:07 AM W. Michael Petullo wrote: > > I am playing with Go and setrlimit(). Here is some code from a test that > executes after setting RLIMIT_NPROC to 0: > > err = exec.Command("true").Run() > if e, ok := err.(*os.PathError); !ok || e.Err.(unix.Errno) != unix.EAGAIN { > t

[go-nuts] EAGAIN from Run is an os.PathError?

2020-03-28 Thread W. Michael Petullo
I am playing with Go and setrlimit(). Here is some code from a test that executes after setting RLIMIT_NPROC to 0: err = exec.Command("true").Run() if e, ok := err.(*os.PathError); !ok || e.Err.(unix.Errno) != unix.EAGAIN { t.Error(err.Error()) } /* Test succ