check super permission: win && linux

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-08-19 15:44:19 +08:00
parent 123a7aa17b
commit 4faf0a3d35
7 changed files with 208 additions and 78 deletions

View File

@@ -676,6 +676,13 @@ pub fn has_hwcodec() -> bool {
return true;
}
pub fn check_super_user_permission() -> bool {
#[cfg(any(windows, target_os = "linux"))]
return crate::platform::check_super_user_permission().unwrap_or(false);
#[cfg(not(any(windows, target_os = "linux")))]
true
}
pub fn check_zombie(childs: Childs) {
let mut deads = Vec::new();
loop {