Skip to content
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

cmd: ipfs handle GUI environment on Windows #6646

Merged
merged 1 commit into from Mar 13, 2020

Conversation

djdv
Copy link
Contributor

@djdv djdv commented Sep 15, 2019

Resolves: #6633

Hacky but maybe acceptable.

If we're not launched from a terminal, we launch the daemon by default.
If we're inside of a terminal, we print help.

https://youtu.be/diam0dQaBdw
(for some reason my cursor didn't get recorded)

@djdv
Copy link
Contributor Author

djdv commented Sep 15, 2019

I'm thinking this should also pass --init along with daemon though.
Otherwise it's still going to launch a ghost window on a fresh install.

Opinions?

@Stebalien
Copy link
Member

Nice! I'm slightly concerned that we'll log something on init and break this but I can't think of a good way to fix that.

I'm thinking this should also pass --init along with daemon though. Otherwise it's still going to launch a ghost window on a fresh install. Opinions?

👍. This makes sense. We've been discussing making this the default anyways.

@djdv
Copy link
Contributor Author

djdv commented Sep 17, 2019

Force pushed over this.
Same as before, but now with --init appended as well.

@djdv
Copy link
Contributor Author

djdv commented Sep 23, 2019

We should probably explicitly block on #1897
It seems like Golang's signal library doesn't send us anything on a WM_CLOSE and instead just kills us immediately if the user sends alt-f4 or clicks the window X.
:^(

I'll have to see if there's a way to get notified of these events from the OS. Otherwise we won't gracefully shutdown (unless the user sends ctrl-c/interrupt).

@Stebalien Stebalien added the status/blocked Unable to be worked further until needs are met label Sep 26, 2019
@djdv
Copy link
Contributor Author

djdv commented Mar 11, 2020

It seems like Golang's signal library doesn't send us anything on a WM_CLOSE and instead just kills us immediately if the user sends alt-f4 or clicks the window X.

This is no longer the case in Go 1.14.
It's worth noting that we receive the shutdown signal but this is not a guarantee we'll shutdown gracefully. The OS will still decide to stop the process if shutdown takes longer than its grace period.
(Typically 5 seconds).

@Stebalien Stebalien removed the status/blocked Unable to be worked further until needs are met label Mar 12, 2020
@Stebalien Stebalien merged commit 457b6e7 into ipfs:master Mar 13, 2020
@Stebalien
Copy link
Member

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When double-clicked on Windows, ipfs.exe should start the daemon
2 participants