You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to spawn other processes from rocket like adb.exe.
The problem is, that adb.exe keeps blocking the port and prevents rocket to be launched again after it was stopped.
After shutting down rocket (process_test.exe) with ctrl + c it is still visible as open port on CurrPorts:
In TaskManager the process is gone, searching for the PID returns: not found.
When I then start the process_test.exe again ,it fails to bind the port and rocket throws the error: Error: Rocket failed to bind network socket to given address/port.
I already tried to use creation_flags or to spawn it with cmd but it still fails to really detach the process or to kill adb.exe together with the parent process like it does on linux.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am very new to rust and face a problem on windows currently.
I hope someone has a hint, as I fail to find a solution with my searches.
DEMO
I uploaded a small example program to demonstrate my problem:
https://github.com/cocoon/rust_process_demo
Long description
I want to spawn other processes from rocket like adb.exe.
The problem is, that adb.exe keeps blocking the port and prevents rocket to be launched again after it was stopped.
The problem can be "seen" for example with nirsoft "CurrPorts":
https://www.nirsoft.net/utils/cports.html#DownloadLinks
After shutting down rocket (process_test.exe) with ctrl + c it is still visible as open port on CurrPorts:
In TaskManager the process is gone, searching for the PID returns: not found.
When I then start the process_test.exe again ,it fails to bind the port and rocket throws the error:
Error: Rocket failed to bind network socket to given address/port.
I already tried to use creation_flags or to spawn it with cmd but it still fails to really detach the process or to kill adb.exe together with the parent process like it does on linux.
const _CREATE_NO_WINDOW: u32 = 0x08000000; const _DETACHED_PROCESS: u32 = 0x00000008; const _CREATE_NEW_PROCESS_GROUP: u32 = 0x00000200;
Any idea how to spawn it and keep adb.exe running without blocking the port?
many thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions