> On Aug. 29, 2017, 2:47 p.m., James Peach wrote: > > 3rdparty/stout/include/stout/exit.hpp > > Lines 37 (patched) > > <https://reviews.apache.org/r/61798/diff/3/?file=1803749#file1803749line37> > > > > What do you think about re-declaring `google::RawLog__` here with the > > [format > > attribute](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-format-function-attribute)? > > > > It is a little gnarly, but worth it IME.
`RAW_LOG` (https://github.com/google/glog/blob/master/src/glog/raw_logging.h.in#L172) checks format attributes already. > On Aug. 29, 2017, 2:47 p.m., James Peach wrote: > > 3rdparty/stout/include/stout/exit.hpp > > Lines 44 (patched) > > <https://reviews.apache.org/r/61798/diff/3/?file=1803749#file1803749line44> > > > > Can we make this emit the same format as `EXIT()`? > > > > ``` > > #define _Exit(status, fmt, ...) > > ... > > RAW_LOG(level, "Exit with status %d: " fmt, status ...); > > ... > > ``` Done. - Andrei ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61798/#review184054 ----------------------------------------------------------- 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, _EXIT supports formatted output conversion, > thereby _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/4/ > > > Testing > ------- > > sudo make check (mac os x, fedora 25) > internal CI > > > Thanks, > > Andrei Budnik > >
