1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00

missing save_errno dance inside non-terminal signal handler

This commit is contained in:
deraadt 2024-07-01 18:43:50 +00:00
parent 6a150e5c35
commit d7da19ca6f

View File

@ -1,4 +1,4 @@
/* $OpenBSD: misc.c,v 1.8 2017/12/18 09:12:49 job Exp $ */
/* $OpenBSD: misc.c,v 1.9 2024/07/01 18:43:50 deraadt Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@ -79,10 +79,13 @@ lg_help(struct cmd *cmds, char **argv)
void
lg_sig_alarm(int sig)
{
int save_errno = errno;
if (child != -1) {
/* Forcibly kill the child, no excuse... */
kill(child, SIGKILL);
}
errno = save_errno;
}
int