|
FlatImage
A configurable Linux containerization system
|
Cleans mountpoint after the PID passed as an argument exits, it works as a fallback in case the main process fails to cleanup. More...
#include <chrono>#include <cstdlib>#include <thread>#include <filesystem>#include <csignal>#include "../std/expected.hpp"#include "../lib/log.hpp"#include "../lib/fuse.hpp"#include "../macro.hpp"Go to the source code of this file.
Functions | |
| void | cleanup (int sig) |
| Signal handler for parent process exit detection. | |
| Value< void > | boot (int argc, char **argv) |
| Boots the main janitor program. | |
| int | main (int argc, char **argv) |
| Entry point for the janitor cleanup process. | |
Variables | |
| volatile std::sig_atomic_t | G_PARENT_OK = 0 |
Cleans mountpoint after the PID passed as an argument exits, it works as a fallback in case the main process fails to cleanup.
Definition in file janitor.cpp.
|
nodiscard |
Boots the main janitor program.
| argc | Argument count |
| argv | Argument vector |
Definition at line 49 of file janitor.cpp.
| void cleanup | ( | int | sig | ) |
Signal handler for parent process exit detection.
Sets the G_PARENT_OK flag to 1 when parent process exits, triggering cleanup operations.
| sig | Signal number (unused) |
Definition at line 36 of file janitor.cpp.
| int main | ( | int | argc, |
| char ** | argv ) |
Entry point for the janitor cleanup process.
| argc | Argument count |
| argv | Argument vector |
Definition at line 99 of file janitor.cpp.
| volatile std::sig_atomic_t G_PARENT_OK = 0 |
Definition at line 26 of file janitor.cpp.