Re: [libiberty] Use pipe inside pex_run

2018-10-01 Thread Ian Lance Taylor via gcc-patches
On Mon, Oct 1, 2018 at 10:53 AM, Nathan Sidwell wrote: > Ian, > this patch implements the pipe error channel you suggested a while back. > Before the (v)fork we create a pipe and set it up for CLOEXEC. If exec > failure happens in the child, we write errno & the fnname to the pipe. In > the pare

[libiberty] Use pipe inside pex_run

2018-10-01 Thread Nathan Sidwell
Ian, this patch implements the pipe error channel you suggested a while back. Before the (v)fork we create a pipe and set it up for CLOEXEC. If exec failure happens in the child, we write errno & the fnname to the pipe. In the parent we attempt to read the pipe. We'll get EOF if the child