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

CreateProcess never ends #5

Closed
javiergutierrezchamorro opened this issue Nov 10, 2014 · 2 comments
Closed

CreateProcess never ends #5

javiergutierrezchamorro opened this issue Nov 10, 2014 · 2 comments
Assignees

Comments

@javiergutierrezchamorro

A issue reported on FileOptimizer have come after some investigation on my side to be releated to Leanify 0.4.2 x86 and x64 precompiled binaries.
The problem happens on at least GZ and PNG files.

Launching it from pure command-line (cmd.exe) works OK, and properly returns errorlevel, but when launched using CreateProcess, GetExitCodeProcess code always returns 259 (STILL_ACTIVE), and what is more, asking it for completion with WaitForSingleObject INFINITE it gets stuck waiting.

Details are here: https://sourceforge.net/p/nikkhokkho/discussion/general/thread/d04bc925/

@JayXon
Copy link
Owner

JayXon commented Nov 10, 2014

It's because Leanify tries to pause if it's not launched from cmd on Windows so that user can see the result before it exit. For example, you can just drag a file to Leanify icon in explorer.

I'll make a fix to avoid pausing if any options are given.

A temporary workaround could be setting PROMPT environment variable to any non empty value.

@JayXon JayXon self-assigned this Nov 10, 2014
@JayXon JayXon closed this as completed in 9047524 Nov 11, 2014
@javiergutierrezchamorro
Copy link
Author

Thank you very much for the fix.

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

No branches or pull requests

2 participants