sysvinit-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sysvinit-devel Digest, Vol 68, Issue 1


From: Jesse Smith
Subject: Re: Sysvinit-devel Digest, Vol 68, Issue 1
Date: Sun, 3 May 2020 14:12:41 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

> 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.
>

According to the read() manual page it seems likely the read attempt
would block which makes me wonder if the filesystem is not responding or
may be unmounted already?

I'm curious as to which version of sysvinit you're using. On modern
versions the control pipe is located at /run/initcrl rather than
/dev/initctl. Do you get the same error code when running the latest
version of sysvinit?

- Jesse




reply via email to

[Prev in Thread] Current Thread [Next in Thread]