mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-02 05:57:46 +00:00
sort: fix test_tmp_files_deleted_on_sigint, wait for signal handling at
the end of the program
This commit is contained in:
parent
33e4b96675
commit
50f1e9a5fa
2 changed files with 7 additions and 1 deletions
|
@ -1267,7 +1267,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
|
|
||||||
settings.init_precomputed();
|
settings.init_precomputed();
|
||||||
|
|
||||||
exec(&mut files, &settings, output, &mut tmp_dir)
|
let result = exec(&mut files, &settings, output, &mut tmp_dir);
|
||||||
|
tmp_dir.wait_if_signal();
|
||||||
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn uu_app<'a>() -> Command<'a> {
|
pub fn uu_app<'a>() -> Command<'a> {
|
||||||
|
|
|
@ -69,6 +69,10 @@ impl TmpDirWrapper {
|
||||||
path,
|
path,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn wait_if_signal(&self) {
|
||||||
|
let _ = self.lock.lock().unwrap();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Remove the directory at `path` by deleting its child files and then itself.
|
/// Remove the directory at `path` by deleting its child files and then itself.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue