[systemd-devel] [PATCH] Remove device and its relatives when action is offlined

Kay Sievers kay at vrfy.org
Tue Sep 10 06:36:26 PDT 2013


On Tue, Sep 10, 2013 at 3:14 PM, MUNEDA Takahiro
<muneda.takahiro at jp.fujitsu.com> wrote:

>> Udev still does all what did before systemd. It was never really able
>> to run or start long-running tasks. Udev can only reliably handle
>> synchronously started and very short-living programs, and that was
>> always the case.
>
>
> Ahh, you are correct.
> But, we used to use a 'trick' to call long-running task by adding '&'
> to kill the relationship between udev and task.

Ah, you mean you wrapped it in /bin/sh and added & there?

Udev never supported any sort of detaching. It's really fragile to do
that, because unlike systemd, udev will fork the same thing over and
over with every event, which can easily cause problems.

> However, current
> implementation does not allow to do that, because even if we call a
> such task by adding '&', all processes are under same cgroup and all
> process will be killed.
> So, my understanding is that we don't have such tricks anymore.

If you need to do that, which we really do not recommend to ever do,
you need to move out of udev's own cgroup, otherwise udev will
rightfully "clean up the mess" you left behind. :)

Kay


More information about the systemd-devel mailing list