> On Aug. 30, 2017, 7:10 a.m., Alexander Rojas wrote:
> > 3rdparty/libprocess/src/subprocess_posix.hpp
> > Lines 198-200 (patched)
> > <https://reviews.apache.org/r/61799/diff/4/?file=1807242#file1807242line198>
> >
> >     Sometimes for debugging is nice to have the errno, could you do it like:
> >     
> >     ```c++
> >     "Failed to os::exvpe on path '%s': (%d) %s",
> >     path.c_str(),
> >     error,
> >     os::strerror(error).c_str()
> >     ```

As `strerror` isn't allowed due to its async-signal unsafety,
```cpp
SAFE_EXIT(errno, "Failed to os::execvpe on path '%s': %d", path.c_str(), errno);
```
is used instead.


- Andrei


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61799/#review184132
-----------------------------------------------------------


On Aug. 21, 2017, 8:54 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61799/
> -----------------------------------------------------------
> 
> (Updated Aug. 21, 2017, 8:54 p.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Alexander Rojas, Benjamin 
> Bannier, Benjamin Mahler, and James Peach.
> 
> 
> Bugs: MESOS-7791
>     https://issues.apache.org/jira/browse/MESOS-7791
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Using ABORT causes coredump when path to an executable is invalid.
> In addition, using of SAFE_EXIT allows us to get rid of string
> concatenation, thereby making `childMain` more async-signal safe.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/subprocess_posix.hpp 
> b478beccff22e2ffa08b9b91cfd5b9c6ada9b697 
> 
> 
> Diff: https://reviews.apache.org/r/61799/diff/5/
> 
> 
> Testing
> -------
> 
> sudo make check (mac os x, fedora 25)
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>

Reply via email to