-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work on Windows if process exits shortly after calling open::that #12
Comments
Thanks for letting me know. Unfortunately I don't have any clue how that could be fixed. Maybe someone with access to a windows machine can chime in. |
Interestingly, it seems the problem happens only when running the program through Cargo. I am currently building a CLI app and I ran a few tests on my Windows 10 :
My knowledge of the Cargo + Windows environment is not enough to explain why it behaves like this. As for the fix, in the meantime, adding in the readme a simple warning about that very specific situation should be enough. |
@Fanaen Thanks a lot for the summary! Do you think you could drop a PR which adds the information you would find helpful? Maybe as some sort of 'Caveats' section. |
I guess the reason is that Here is an example too see it more clearly:
fn main() {
std::thread::sleep_ms(3000);
println!("Hello");
}
extern crate open;
fn main() {
open::that("sleep-hello.exe");
std::thread::sleep_ms(1000);
} You will see that there is a Back to the |
I've opened an issue in cargo repo: rust-lang/cargo#5598 |
This issue has been fixed; the given code works for me with or without the sleep. |
Indeed, works now |
Hello,
I am basically doing this:
So, if the sleep is removed, nothing is being opened.
The text was updated successfully, but these errors were encountered: