mcexec: Fix error handling of init_worker_threads
Refs: #1233 Change-Id: Icce49c996d69b3cf64a71e7bd470421f329c881f
This commit is contained in:
committed by
Dominique Martinet
parent
dbe5e99cf9
commit
da02f76a25
@ -1487,8 +1487,9 @@ int init_worker_threads(int fd)
|
||||
int ret = create_worker_thread(NULL, &init_ready);
|
||||
|
||||
if (ret) {
|
||||
printf("ERROR: creating syscall threads (%d), check ulimit?\n", ret);
|
||||
return ret;
|
||||
printf("ERROR: creating worker threads (%d), check ulimit?\n",
|
||||
ret);
|
||||
return -ret;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2757,8 +2758,9 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (init_worker_threads(fd) < 0) {
|
||||
perror("worker threads: ");
|
||||
if ((error = init_worker_threads(fd)) != 0) {
|
||||
fprintf(stderr, "%s: Error: creating worker threads: %s\n",
|
||||
__func__, strerror(-error));
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
@ -3569,11 +3571,11 @@ gettid_out:
|
||||
n_threads = 4;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
if (init_worker_threads(fd) < 0) {
|
||||
perror("worker threads: ");
|
||||
if ((ret = init_worker_threads(fd)) != 0) {
|
||||
fprintf(stderr, "%s: Error: creating worker threads: %s\n",
|
||||
__func__, strerror(-ret));
|
||||
close(fd);
|
||||
ret = -1;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fork_child_sync_pipe:
|
||||
|
||||
Reference in New Issue
Block a user