mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-01-11 10:35:41 +00:00
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
This commit is contained in:
parent
78373e45c5
commit
7585a27356
|
@ -59,9 +59,9 @@ void *thread_function(void *data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
if (argc < 2) {
|
if (argc < 3) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: linux_dumper_unittest_helper <pipe fd> <# of threads\n");
|
"usage: linux_dumper_unittest_helper <pipe fd> <# of threads>\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int pipefd = atoi(argv[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.
|
// Signal parent that this process has started all threads.
|
||||||
uint8_t byte = 1;
|
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);
|
thread_function(NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue