Skip to content

Commit

Permalink
Ignore sigpipe in gapir
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-purcell committed Aug 2, 2018
1 parent 33e4b3b commit 0c0ce2d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/gapir/cc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "core/cc/supported_abis.h"
#include "core/cc/target.h"

#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -272,6 +273,11 @@ int main(int argc, const char* argv[]) {
}
}

#if TARGET_OS == GAPID_OS_LINUX
// Ignore SIGPIPE so we can log after gapis closes.
signal(SIGPIPE, SIG_IGN);
#endif

if (wait_for_debugger) {
GAPID_INFO("Waiting for debugger to attach");
core::Debugger::waitForAttach();
Expand Down

0 comments on commit 0c0ce2d

Please sign in to comment.