Lines Matching +full:wait +full:- +full:retry +full:- +full:us

47 #include <sys/wait.h>
122 # define UMOUNT "do-not-use-this-value"
136 /// \return -1 to indicate error, although this should never happen.
142 return -1; in unmount()
154 /// Executes 'mount -t tmpfs' (or a similar variant).
170 mount_args[last++] = "-ttmpfs"; in run_mount_tmpfs()
172 size_arg = F("-osize=%s") % size; in run_mount_tmpfs()
181 mount_args[last++] = "-ttmpfs"; in run_mount_tmpfs()
183 size_arg = F("-osize=%s") % size; in run_mount_tmpfs()
192 mount_args[last++] = "-ttmpfs"; in run_mount_tmpfs()
194 size_arg = F("-o-s%s") % size; in run_mount_tmpfs()
203 mount_args[last++] = "-Ftmpfs"; in run_mount_tmpfs()
205 size_arg = F("-o-s%s") % size; in run_mount_tmpfs()
227 INV(ret == -1); in run_mount_tmpfs()
245 if (::unmount(mount_point.c_str(), 0) == -1) { in unmount_with_unmount2()
266 if (pid == -1) { in unmount_with_umount8()
272 INV(ret == -1); in unmount_with_umount8()
278 retry: in unmount_with_umount8()
279 if (::waitpid(pid, &status, 0) == -1) { in unmount_with_umount8()
282 goto retry; in unmount_with_umount8()
283 throw fs::system_error("Failed to wait for unmount subprocess", in unmount_with_umount8()
310 if (::lstat(path.c_str(), &sb) == -1) { in safe_stat()
430 /// \return The amount of free space usable by a non-root user.
438 if (::statvfs(path.c_str(), &buf) == -1) { in free_disk_space()
446 if (::statfs(path.c_str(), &buf) == -1) { in free_disk_space()
478 if (::mkdir(dir.c_str(), static_cast< mode_t >(mode)) == -1) { in mkdir()
523 /// - Allow the unprivileged code to write to files in the work directory by
525 /// monitor code running as root). This requires us to grant search
528 /// - Allow the test cases themselves to call getcwd(3) at any point. At least
530 /// path components leading to the current directory. This requires us to
564 if (::chmod(path.c_str(), 0755) == -1) { in mkdtemp_public()
573 LW(F("Failed to delete just-created temporary directory %s") in mkdtemp_public()
608 if (::mkstemp(buf.get()) == -1) { in mkstemp()
648 if (pid == -1) { in mount_tmpfs()
657 retry: in mount_tmpfs()
658 if (::waitpid(pid, &status, 0) == -1) { in mount_tmpfs()
661 goto retry; in mount_tmpfs()
662 throw fs::system_error("Failed to wait for mount subprocess", in mount_tmpfs()
684 /// This operation simulates a "rm -r". No effort is made to forcibly delete
697 if (iter->name == "." || iter->name == "..") in rm_r()
700 const fs::path entry = directory / iter->name; in rm_r()
724 if (::rmdir(file.c_str()) == -1) { in rmdir()
762 if (::unlink(file.c_str()) == -1) { in unlink()
787 retry: in unmount()
797 retries--; in unmount()
799 goto retry; in unmount()