Skip to content

rc-service start hangs when input_file set to fifo pipe #982

@CelestialCrafter

Description

@CelestialCrafter

Description

When using openrc-run's input_file directive with a fifo pipe at the path specified, doing rc-service <name> start hangs, and only continues the start process after something is written to the pipe.
After using strace, I found that the issue is in an openat call within start-stop-daemon.
Possibly consider using O_NONBLOCK or O_NDELAY for the openat call?

Example

Service:

#!/sbin/openrc-run

name=example
command=sleep
command_args=infinity
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
input_file="/var/lib/example-stdin.pipe"

Commands:

mkdir -p /var/lib
mkfifo /var/lib/example-stdin.pipe
rc-service example start
# resolve the hanging
echo bweh > /var/lib/example-stdin.pipe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions