mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Budnik <abud...@mesosphere.com>
Subject Re: Review Request 61798: Added SAFE_EXIT as alternative to ABORT.
Date Mon, 04 Sep 2017 11:28:56 GMT


> On Aug. 30, 2017, 6:36 a.m., Alexander Rojas wrote:
> > 3rdparty/stout/include/stout/exit.hpp
> > Lines 42 (patched)
> > <https://reviews.apache.org/r/61798/diff/4/?file=1807241#file1807241line42>
> >
> >     I believe the name of this macro needs to be changed. From the C standard section
[7.1.3](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf):
> >     
> >     > * All identifiers that begin with an underscore and either an uppercase
letter or another
> >     underscore are always reserved for any use.
> >     > * All identifiers that begin with an underscore are always reserved for
use as identifiers
> >     with file scope in both the ordinary and tag name spaces.
> >     
> >     Likewise, from C++ [perspective](http://en.cppreference.com/w/cpp/keyword):
> >     
> >     > Also, all identifiers that contain a double underscore __ in any position
and each identifier that begins with an underscore followed by an uppercase letter is always
reserved and all identifiers that begin with an underscore are reserved for use as names in
the global namespace. See identifiers for more details.

Thanks for good observation!
`_EXIT` was renamed to `SAFE_EXIT`.


- Andrei


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


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/61798/
> -----------------------------------------------------------
> 
> (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
> -------
> 
> EXIT macro can't be used when async-signal safety is required.
> 
> Currently, ABORT is used for terminating a program after both
> unexpected and expected errors, when async-signal safety is required.
> In case of expected errors, `abort` causes coredumps, which might be
> undesirable.
> 
> In addition, SAFE_EXIT supports formatted output conversion,
> thereby SAFE_EXIT interface doesn't force users to concatenate strings,
> thus making its usage more async-signal safe.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/exit.hpp e5c2d3440a85ab2d2cae551ee4094cd965e38dfc 
> 
> 
> Diff: https://reviews.apache.org/r/61798/diff/5/
> 
> 
> Testing
> -------
> 
> sudo make check (mac os x, fedora 25)
> internal CI
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message