initctl: skip return value for uev_*_init(), optional

We have these neat extras for added value, if they should fail, for
whatever reason, we still want to present 'top' to the user, which may
have to use 'reset' if exited improperly and lost cooked/cursor.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-04-07 13:57:43 +02:00
parent 4e6b9514d5
commit f0bf1343b0
+4 -4
View File
@@ -617,11 +617,11 @@ int show_cgtop(char *arg)
flags = fcntl(STDIN_FILENO, F_GETFL);
if (flags != -1)
(void)fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK);
uev_io_init(&ctx, &input, key, NULL, STDIN_FILENO, UEV_READ);
(void)uev_io_init(&ctx, &input, key, NULL, STDIN_FILENO, UEV_READ);
uev_signal_init(&ctx, &sigint, leave, NULL, SIGINT);
uev_signal_init(&ctx, &sigterm, leave, NULL, SIGTERM);
uev_signal_init(&ctx, &sigquit, leave, NULL, SIGQUIT);
(void)uev_signal_init(&ctx, &sigint, leave, NULL, SIGINT);
(void)uev_signal_init(&ctx, &sigterm, leave, NULL, SIGTERM);
(void)uev_signal_init(&ctx, &sigquit, leave, NULL, SIGQUIT);
}
return uev_run(&ctx, 0);