mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
filewrapper: _Exit
instead of CHECK
failing
Raw `SAPI_RAW_PCHECK` may dump core, depending on environment settings (issue #89). This is undesirable in the face of invalid command-line arguments. Signed-off-by: Christian Blichmann <cblichmann@google.com>
This commit is contained in:
parent
e5a810eef4
commit
3745d58587
|
@ -97,7 +97,12 @@ class File {
|
|||
}
|
||||
~File() { fclose(stream_); }
|
||||
|
||||
void Check() { SAPI_RAW_PCHECK(!ferror(stream_), "I/O on %s", name_); }
|
||||
void Check() {
|
||||
if (ferror(stream_)) {
|
||||
SAPI_RAW_PLOG(ERROR, "I/O on %s", name_);
|
||||
_Exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
FILE* get() const { return stream_; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user