PaleNeutron
PaleNeutron

Reputation: 3215

How to run an executable program in Fortran and block it's stdout

I have an exe program and I want to invoke it in my program.

However, the exe has too much output in console and the systemqq function seems can not block it.

the signal of finishing the exe is demanded so I have to wait the termination of the program.

I have the source of exe program and considered to change it to a window program instead of a console program, but it is much more complex than doing this in C/C++.

Win32 api Creating Processes is also considered, but I have no idea how to use it in Fortran.

I am not an expert in Fortran. Many thanks in advance.

Upvotes: 0

Views: 148

Answers (1)

Fortranner
Fortranner

Reputation: 2605

If the executable is a.exe, you can redirect its output to the Windows equivalent of /dev/null using

a.exe > nul

Upvotes: 1

Related Questions