mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
fix kill occupied ipc process, find with enumerate, kill with NtTerminateProcess (#8289)
* I reproduced the issue, that process did't have title, couldn't be connected to and taskkill not work * Test whether ipc is opccupied with enumerating named pipe * With NtTerminateProcess, it was killed successfully. * There is a way to find the exact process which occupy the ipc, I have not check it, it's from https://github.com/winsiderss/systeminformer Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -22,15 +22,6 @@ macro_rules! my_println{
|
||||
};
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_empty_uni_link(arg: &str) -> bool {
|
||||
let prefix = crate::get_uri_prefix();
|
||||
if !arg.starts_with(&prefix) {
|
||||
return false;
|
||||
}
|
||||
arg[prefix.len()..].chars().all(|c| c == '/')
|
||||
}
|
||||
|
||||
/// shared by flutter and sciter main function
|
||||
///
|
||||
/// [Note]
|
||||
@@ -168,7 +159,7 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
init_plugins(&args);
|
||||
log::info!("main start args:{:?}", args);
|
||||
if args.is_empty() || is_empty_uni_link(&args[0]) {
|
||||
if args.is_empty() || crate::common::is_empty_uni_link(&args[0]) {
|
||||
std::thread::spawn(move || crate::start_server(false));
|
||||
} else {
|
||||
#[cfg(windows)]
|
||||
|
||||
Reference in New Issue
Block a user