Skip to content

Restart or exit when command exits? #5

@sussycatgirl

Description

@sussycatgirl

Hi!

I'm trying to stream a v4l2 device, and I run mjpeg-server in a systemd service that starts after another service that writes to the video device starts. Sometimes I run into a race condition where the command passed to the mjpeg server can't yet access the camera and crashes. When that happens, I see exit status 255 logged, but from what I can tell the program makes no effort to restart it.

As a workaround I can pass something like bash -c 'while [[ true ]]; do gst-launch-1.0 ....; done', but I think there should be an option for mjpeg-server to either restart the process or also exit when the process exits (the latter would let systemd handle the restarting in my use case).

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions