mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-20 23:43:20 +03:00
workaround of handle subprocess from run_as_user
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -297,6 +297,10 @@ pub fn start_os_service() {
|
|||||||
&mut last_restart,
|
&mut last_restart,
|
||||||
&mut server,
|
&mut server,
|
||||||
) {
|
) {
|
||||||
|
// to-do: stop_server(&mut user_server); may not stop child correctly
|
||||||
|
// stop_rustdesk_servers() is just a temp solution here.
|
||||||
|
stop_rustdesk_servers();
|
||||||
|
std::thread::sleep(std::time::Duration::from_millis(super::SERVICE_INTERVAL));
|
||||||
match crate::run_me(vec!["--server"]) {
|
match crate::run_me(vec!["--server"]) {
|
||||||
Ok(ps) => server = Some(ps),
|
Ok(ps) => server = Some(ps),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
@@ -327,6 +331,7 @@ pub fn start_os_service() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
stop_rustdesk_servers();
|
||||||
stop_server(&mut user_server);
|
stop_server(&mut user_server);
|
||||||
stop_server(&mut server);
|
stop_server(&mut server);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user