Displaying 2 results from an estimated 2 matches for "check_for_event".
2020 Oct 20
1
[PATCH nbdkit INCOMPLETE] New filter: exitwhen: exit gracefully when an event occurs.
This incomplete patch adds a new filter allowing more control over
when nbdkit exits. You can now get nbdkit to exit gracefully on
certain events, such as a file being created, a pipe held open by
another process going away, or when another PID exits. There is also
a script option to allow for completely custom events.
It is untested at the moment, I'm posting it to get feedback on the
2020 Oct 21
0
[PATCH nbdkit] New filter: exitwhen: exit gracefully when an event occurs.
...ptr);
+}
+
+/* If exiting is already true, this does nothing and returns true.
+ * Otherwise it checks if any event in the list has happened. If an
+ * event has happened, sets exiting to true. It returns the exiting
+ * flag.
+ *
+ * This must only be called with the lock held.
+ */
+static void check_for_event_file_created (const struct event *);
+static void check_for_event_file_deleted (const struct event *);
+static void check_for_event_process_exits (const struct event *);
+static void check_for_event_fd_closed (const struct event *);
+static void check_for_event_script (const struct event *);
+
+sta...