<div dir="ltr">not really in the sense that qemu-nbd launches and immediately gives the hand back to the script that called it.<br>the script ends positively and qemu-nbd is killed by systemd because it is considered to be garbage left behind by the script.<br><div>this is not quite the case of a timeout that systemd terminates, but the result is the same.</div><div>in this case, qemu-nbd looks more like a daemon.<br></div><div><br></div><div>I was wondering if there was a way to propagate the killmode through a udev rule that starts a script (like a service)... but it seems from the documentation that the answer is no :-(</div><div><br></div><div><i>"""In order
to activate long-running processes from udev rules, provide a service unit and pull it in from a
udev device using the <code class="gmail-varname">SYSTEMD_WANTS</code> device property. See
<a href="https://www.freedesktop.org/software/systemd/man/systemd.device.html#"><span class="gmail-citerefentry"><span class="gmail-refentrytitle">systemd.device</span>(5)</span></a>
for details."""</i></div><div>I would appreciate (and maybe I won't be the only one) a concrete example based, for example, on my problem ;-)<br></div><div><br></div><div>let's just say that my rule is :</div><div><br></div><div><span style="font-family:monospace">KERNEL=="sdb", RUN+="/usr/local/sbin/myscript"<br></span></div><div></div><div><br></div><div>and my script is :</div><div><br></div><div><span style="font-family:monospace">#!/usr/bin/bash<br>qemu-nbd -r -s -f raw -c /dev/nbd0 /dev/sdb</span></div><div><br></div><div>regards, lacsaP.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 20 mai 2022 à 17:43, Mike Gilbert <<a href="mailto:floppym@gentoo.org">floppym@gentoo.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, May 20, 2022 at 10:51 AM Pascal <<a href="mailto:patatetom@gmail.com" target="_blank">patatetom@gmail.com</a>> wrote:<br>
> it is not strictly speaking a long-running process but it is a child who survives his father and who is killed when his father stops living successfully ! what a strange world these children live in... ;-)<br>
<br>
Sorry, I missed this last line. Are you sure it isn't long-running? It<br>
really makes no sense for it to fork this way.<br>
</blockquote></div>