2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

restore: fix checking error code of sys_sigaction

sys_sigaction() returns an error code

Reported-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrew Vagin
2015-10-08 09:29:00 +03:00
committed by Pavel Emelyanov
parent 002c81c3ce
commit d9b1b9ff37

View File

@@ -720,8 +720,9 @@ static int prepare_sigactions(void)
* sigaction overwrites se_restorer.
*/
ret = sys_sigaction(sig, &act, NULL, sizeof(k_rtsigset_t));
if (ret == -1) {
pr_err("%d: Can't restore sigaction: %m\n", pid);
if (ret < 0) {
errno = -ret;
pr_perror("Can't restore sigaction");
goto err;
}