mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 09:20:52 +08:00
9697f95b8f
This reverts commit 15d999759e
.
25 lines
461 B
C
25 lines
461 B
C
#include "lib_acl.h"
|
|
#include <signal.h>
|
|
|
|
static void on_sigterm(int signo)
|
|
{
|
|
acl_msg_info("get signal sigterm: %d, %d", signo, SIGTERM);
|
|
}
|
|
|
|
static void on_sigkill(int signo)
|
|
{
|
|
acl_msg_info("get signal sigkill: %d, %d", signo, SIGKILL);
|
|
}
|
|
|
|
int main(int argc acl_unused, char *argv[] acl_unused)
|
|
{
|
|
acl_msg_open("./child.log", "child");
|
|
signal(SIGTERM, on_sigterm);
|
|
signal(SIGKILL, on_sigkill);
|
|
|
|
while (1)
|
|
pause();
|
|
|
|
return (0);
|
|
}
|