Calling command prompt from Qt application without freezing?
By : user2141340
Date : March 29 2020, 07:55 AM
seems to work fine QProcess is really the answer. If you want to use something like system() you'll have to either put the call in another thread or use popen or something simmilar for your platforms. QProcess does have the setReadChannel which you could use to display your own console window to show the output.
|
How is interacting with a prompt of a third party command line program different from a Windows Command prompt?
By : Codewarlock
Date : March 29 2020, 07:55 AM
like below fixes the issue Most likely the program starts its own shell and does no longer interact with the original one. (You would notice this if the program opens a new window) Or the program needs some specific library to be present to be able to interact with a shell ( readline seems to be the case here) and that is not present in your Java Environment.
|
Command Prompt Freezing on GCC compile
By : ebou
Date : March 29 2020, 07:55 AM
To fix this issue Good question. I firmly believe this is a bug in GCC win32 (in my case MinGW), although specifics are hard to determine, so I'm not sure if there's an existing bug report for it or I'd quote it here. It seems to affect very few people since I've seen no mention of it elsewhere. Evidence I have a complex running application that I've been developing for some time; but every now and then, even with a trivial incremental change (one line, error-free), GCC will lock up in the command prompt (with Admin permissions) which sometimes can be closed, whereas other times neither the close button nor Task Manager nor Windows shutdown can release the process; attempting to run GCC in another command prompt fails similarly. I must then force reboot. Following reboot, some sort of cache or gcc application state must have been cleared, since compilation then goes off without a hitch. gcc -v returns: code :
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
--enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
|
Command Prompt freezing after pressing enter, invalid loop
By : aniket phadatare
Date : March 29 2020, 07:55 AM
it should still fix some issue I don't even know where to start... there are multiple errors in your code: code :
while ( choice != 4 );
if ( choice == 1 )
if ( choice != 4 || choice == 4 ){
case 1:
if ( choice == 1 ) {
System.out.println( "Enter a percentage to multiply by" );
percent = input.nextFloat();
}
|
Get already running windows process' console output in a command prompt? Direct StreamReader to command prompt
By : veliaze
Date : March 29 2020, 07:55 AM
it helps some times Windows does not provide any mechanism to retroactively give another process a standard output handle if it was created without one. (Besides, in most cases an application will check the standard output handle only during startup.) If you know (or can successfully guess) how a specific application generates output, it may in principle be possible to start capturing that output by injecting your own code into the process. For example, if you know that the application uses C++ and is dynamically linked to the VS2015 runtime library, you might inject code that calls freopen as shown here. (In this scenario, you must know which runtime library the application uses because you have specify it when looking up the address for freopen.)
|