Make Git router teardown process-bounded
This commit is contained in:
parent
31e9ab0f2d
commit
e60baad993
2 changed files with 191 additions and 35 deletions
|
|
@ -202,11 +202,12 @@ impl IgnoredWorkspace {
|
|||
&mount_config(configuration.threads),
|
||||
)?;
|
||||
if let Err(error) = ready() {
|
||||
let _ = session.umount_and_join();
|
||||
drop(session);
|
||||
return Err(error);
|
||||
}
|
||||
std::io::copy(&mut std::io::stdin().lock(), &mut std::io::sink())?;
|
||||
session.umount_and_join()
|
||||
drop(session);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn root(&self, backing: Classification) -> &BackingRoot {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,17 @@ use fuser::{Config, LockOwner, MountOption};
|
|||
use nix::fcntl::{FcntlArg, fcntl};
|
||||
|
||||
use super::nodes::{OpenFile, fuse_lock, record_lock};
|
||||
use super::{Classification, IgnoredWorkspace};
|
||||
use super::{Classification, IgnoredWorkspace, mount_config};
|
||||
|
||||
static SEQUENCE: AtomicU64 = AtomicU64::new(0);
|
||||
|
||||
#[test]
|
||||
fn multithreaded_router_uses_independent_fuse_channels() {
|
||||
let config = mount_config(8);
|
||||
assert_eq!(config.n_threads, Some(8));
|
||||
assert!(config.clone_fd);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn posix_lock_owners_use_distinct_backing_lock_domains() {
|
||||
let fixture = Fixture::new();
|
||||
|
|
|
|||
Loading…
Reference in a new issue