-
Notifications
You must be signed in to change notification settings - Fork 23
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
Use --console logic automatically on Windows #29
Comments
imagej-launcher/src/main/c/ImageJ.c Lines 1067 to 1072 in 3e06152
|
When ImageJ is called from background processes, as is the case when using pseudo cluster software to make use of otherwise unused machines, the console is definitely not to be attached. Worse, the reason to introduce the Thus, while this ticket was certainly well-intentioned, the problems are much, much harder than the report anticipates. |
@dscho Sorry for the "undocumented" comment—I ran with Thanks for explaining some of the difficulties if the situation is to improve. So it seems research will be needed into how to robustly avoid violating the Least Astonishment Principle in various circumstances. Quick searches seem to indicate it might be possible to attach a console without necessarily creating one (e.g., this API call in C++ purports to do so). |
I feel compelled to comment that (in Windows) including the For example, In all cases, the console appears to be waiting for the command to finish (with a blinking cursor at the far left and no empty prompt appearing). In actuality, the prompt is "invisible". I can type commands and they run (upon enter), or tab through the files in the directory. The normal prompt returns on enter. Also, the output to the cmd window must not be standard output because it doesn't redirect (e.g. to a file). |
@teknowledgist Thanks, I have noticed some similar behaviors, and agree it is suboptimal, but I have neither the bandwidth nor particular expertise to fix it. Feel free to dig into the code. It should be pretty straightforward to make changes to the source, then rebuild and test using |
In many scenarios on Windows, it is necessary to pass the
--console
flag so that the console it attached correctly. Otherwise, no output will ever been shown.This flag is unfortunate, and it would be best if we could get rid of it completely. But barring that, let's at least be smarter about automatically enabling the console attach feature in circumstances where it is known to be necessary, such as with
--headless
.See also #10, #11.
The text was updated successfully, but these errors were encountered: