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 (mask & IN_CREATE) {
|
||||||
if (!iwp) {
|
if (!iwp) {
|
||||||
pidfile_add_path(iw, path);
|
if (!pidfile_add_path(iw, path))
|
||||||
pidfile_scandir(iw, path, sizeof(path));
|
pidfile_scandir(iw, path, sizeof(path));
|
||||||
}
|
}
|
||||||
} else if (mask & IN_DELETE) {
|
} else if (mask & IN_DELETE) {
|
||||||
if (iwp)
|
if (iwp)
|
||||||
@@ -265,9 +265,9 @@ static void pidfile_init(void *arg)
|
|||||||
*
|
*
|
||||||
* service <net/iface/lo> /sbin/dropbear ...
|
* service <net/iface/lo> /sbin/dropbear ...
|
||||||
*
|
*
|
||||||
* Which provides the <pid/sbin/dropbear> condition, will not be
|
* Which provides the <pid/dropbear> condition, will not be set by
|
||||||
* set by pidfile.so during `initctl reload` because dropbear is
|
* pidfile.so during `initctl reload` because dropbear is still
|
||||||
* still SIGSTP:ed waiting for <net/iface/lo>.
|
* SIGSTP:ed waiting for <net/iface/lo>.
|
||||||
*/
|
*/
|
||||||
static plugin_t plugin = {
|
static plugin_t plugin = {
|
||||||
.name = __FILE__,
|
.name = __FILE__,
|
||||||
|
|||||||
Reference in New Issue
Block a user