summaryrefslogtreecommitdiff
path: root/tools/bit/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bit/command.cpp')
-rw-r--r--tools/bit/command.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/bit/command.cpp b/tools/bit/command.cpp
index 9a8449bf9356..1ff7c221b26e 100644
--- a/tools/bit/command.cpp
+++ b/tools/bit/command.cpp
@@ -105,7 +105,9 @@ get_command_output(const Command& command, int* err, bool quiet)
}
int fds[2];
- pipe(fds);
+ if (0 != pipe(fds)) {
+ return string();
+ }
pid_t pid = fork();