mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
plugins: pidfile: only scan directory if watch added successfully
Also, update condition example in comment. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+5
-5
@@ -138,8 +138,8 @@ static void pidfile_handle_dir(struct iwatch *iw, char *dir, char *name, int mas
|
||||
|
||||
if (mask & IN_CREATE) {
|
||||
if (!iwp) {
|
||||
pidfile_add_path(iw, path);
|
||||
pidfile_scandir(iw, path, sizeof(path));
|
||||
if (!pidfile_add_path(iw, path))
|
||||
pidfile_scandir(iw, path, sizeof(path));
|
||||
}
|
||||
} else if (mask & IN_DELETE) {
|
||||
if (iwp)
|
||||
@@ -265,9 +265,9 @@ static void pidfile_init(void *arg)
|
||||
*
|
||||
* service <net/iface/lo> /sbin/dropbear ...
|
||||
*
|
||||
* Which provides the <pid/sbin/dropbear> condition, will not be
|
||||
* set by pidfile.so during `initctl reload` because dropbear is
|
||||
* still SIGSTP:ed waiting for <net/iface/lo>.
|
||||
* Which provides the <pid/dropbear> condition, will not be set by
|
||||
* pidfile.so during `initctl reload` because dropbear is still
|
||||
* SIGSTP:ed waiting for <net/iface/lo>.
|
||||
*/
|
||||
static plugin_t plugin = {
|
||||
.name = __FILE__,
|
||||
|
||||
Reference in New Issue
Block a user