[2019-09-11 00:34] Lorenzo Puliti <lorenzo.r...@gmail.com> > Package: runit > Version: 2.1.2-34 > Followup-For: Bug #933078 > > >> `kill -14 1` > > > > Fire-and-forget -- yes. > > I'm doing some live testing on my box before sending a refreshed patch > to init-system-helpers maintainers: sadly this is not working as I expect. > > I've added a runit-force-rescan sub to update-rc.d > > sub runit_force_rescan { > if (-f "/run/runit.stopit") { > system("kill", "-14", "1"); > system("sleep", "1.5"); > } > } > > and without the `sleep 1.5` i'm still running into > an error on postinst stage (example with openssh-server)
When pid1 receives sigalarm, it forwards it to stage2 process, which, in case of runsvdir, does what it usually does if 5 seconds are expired *and* /etc/service directory is modified. After it is done, it writes /etc/service/.forced-rescan. Seems I was inaccurate in my wording -- you can't just send signal and expect rescan to happen instantly,... > So there is still a lag of 1.5 seconds from the moment runsvdir > detects a new directory and the moment the runsv process create the ok > pipe. Also, i'm afraid this lag may be affected from the filesystem > type and the hardware, so i need to keep a workaround like (1) in > place. I'm waiting to test with a service that links the supervise > directory into run (there is none currently), maybe it helps? Any > hope to further reducing this lag? ... but 1.5 seconds to definitely too much. I hope to take a look and make more accurate testing on this, but my AFK life got quite distracting recently. -- Note, that I send and fetch email in batch, once in a few days. Please, mention in body of your reply when you add or remove recepients.
pgpQzvHWWJQ8Y.pgp
Description: PGP signature