|
From: | Gaofan |
Subject: | Why sometimes init process read /dev/initctl return -1? |
Date: | Thu, 30 Apr 2020 15:14:14 +0800 (CST) |
We use sysvinit to build our system. When I input "poweroff" command, sometimes the system has no response.
I did some investigation, and found that in the function check_init_fifo() of init, the line:
n = read(pipe_fd, &request, sizeof(request));
sometimes it return -1, and the error code is EAGAIN.
I modified the init code, and let it retry for 5 times when the error code is EAGAIN, but not work well.
Does anyone know why sometimes read /dev/initctl return -1? How to resolve this? Thanks.
[Prev in Thread] | Current Thread | [Next in Thread] |