-
Notifications
You must be signed in to change notification settings - Fork 49
creationFlags are not supported on linux/osx #459
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
creationFlags are not supported on linux/osx #459
Conversation
|
Looking good. Does it behave as expected in that condition for Linux/Mac? For example, as |
|
well no, there is no easy way to do it. If you are running from terminal, there is really no concept of detaching. Running under desktop environment, there you would need to specify what terminal emulator you are using, what shell you are using and then spawn it and run subprocess. This is by my opinion too much hustle to do. Now it doesn't detach iself but I don't think it affect usability very much - I've ran into it when trying to launch Python action from Launcher. Now the Python interpreter will start in the same terminal we used to start avalon. There is one almost universal way - using xterm, but using it is like time travel to Middle Ages. |
|
Ah ok, the only caveat then is that the Should we maybe mention it in a comment in the code too? |
|
True, I've added comment there explaining behaviour. We could probably later add such functionality for linux, but it would require lots of code I don't think is worth to invest there. Those flags were until now show-stopper on linux so this little change will stop crashes there albeit without full functionality as on Windows. |
|
Wait, why would you be setting |
|
This is not problem with |
|
To be more precise I found out Launcher action starting Python is setting |
avalon/lib.py
Outdated
|
|
||
| # this won't do anything on linux/macos as `creationFlags` are | ||
| # only windows specific. | ||
| if env.get("CREATE_NEW_CONSOLE"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To improve readability of this, could we make it:
if IS_WIN32 and env.get("CREATE_NEW_CONSOLE"):
...|
Looks good, thanks! |
|
Add another note for future referencing :) |
Avalon is using
creationFlagsto launch subprocess via itslaunch()function.CreationFlagsare supported only on Windows in Python. It is therefor failing on linux and macos.What's changed?
I've just added condition to use it only on Windows.