Skip to content

Commit

Permalink
ts_uinput: correctly return in case forking fails
Browse files Browse the repository at this point in the history
  • Loading branch information
merge committed Apr 3, 2017
1 parent 292e573 commit dbb8f4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/ts_uinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,16 @@ int main(int argc, char **argv)
fflush(stdout);
} else {
perror("ioctl UI_GET_SYSNAME");
goto out;
}
} else {
fprintf(stderr, DEFAULT_UINPUT_NAME
": See the kernel log for the device number\n");
}
if (daemon(0, 0) == -1)
if (daemon(0, 0) == -1) {
perror("error starting daemon");
goto out;
}
}

while (1) {
Expand Down

0 comments on commit dbb8f4c

Please sign in to comment.