aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-03 12:48:43 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-03 12:48:43 +0000
commit7585a273566dacc63c164951d10ee3767892bbef (patch)
tree8a8f9ea46996b45bf9a36b6384764c16f61e7dba
parentFix for putting main module as first one in minidump (diff)
downloadbreakpad-7585a273566dacc63c164951d10ee3767892bbef.tar.xz
Fix several issues in linux_dumper_unittest_helper
Patch by Chris Dearman <chris@mips.com> R=ted at http://breakpad.appspot.com/369001/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@943 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
index 27c2e994..6e3d5e4b 100644
--- a/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ b/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -59,9 +59,9 @@ void *thread_function(void *data) {
}
int main(int argc, char *argv[]) {
- if (argc < 2) {
+ if (argc < 3) {
fprintf(stderr,
- "usage: linux_dumper_unittest_helper <pipe fd> <# of threads\n");
+ "usage: linux_dumper_unittest_helper <pipe fd> <# of threads>\n");
return 1;
}
int pipefd = atoi(argv[1]);
@@ -79,7 +79,10 @@ int main(int argc, char *argv[]) {
}
// Signal parent that this process has started all threads.
uint8_t byte = 1;
- write(pipefd, &byte, sizeof(byte));
+ if (write(pipefd, &byte, sizeof(byte)) != sizeof(byte)) {
+ perror("ERROR: parent notification failed");
+ return 1;
+ }
thread_function(NULL);
return 0;
}