10 #include <sys/types.h>
24 namespace auto_umount {
29 if (mountpoint ==
"") {
45 if (all_mountpoints.empty()) {
47 "crash cleanup handler: "
48 "failed to read mount point list");
57 bool still_mounted =
false;
58 for (
unsigned i = 0; i < all_mountpoints.size(); ++i) {
73 expected_error = ENXIO;
75 expected_error = ENOTCONN;
78 if (dirp || (errno != expected_error)) {
82 "crash cleanup handler: "
83 "%s seems not to be stalled (%d)",
91 "crash cleanup handler: "
92 "failed to re-gain root privileges");
95 const bool lazy =
true;
99 "crash cleanup handler: "
100 "failed to unmount %s",
void SetMountpoint(const string &mountpoint)
bool SwitchCredentials(const uid_t uid, const gid_t gid, const bool temporarily)
void SafeSleepMs(const unsigned ms)
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)