This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libfortran] PR32784 CONIN$, CONOUT$, and CONERR$ for Cygwin and mingw


Dave Korn wrote:
Danny Smith wrote:

  Pardon me Danny, I'm piggybacking on your reply here but it's mostly
directed at Jerry.

--- snip ---

The program then hangs until I press <Enter> key.

That would be it waiting for input on CONIN$, wouldn't it?

Yes it is waiting for input.



The last output to CONOUT is lost.

Similar problems occur if I redirect stdout or stderr output.

If redirect stdin through a pipe (eg when testing the program from a
text editor) I get:
Hello, world!
This goes to conerr$!
At line 9 of file conout.f90 (unit = 49, file = 'CONIN$')
Fortran runtime error: Bad file descriptor

Jerry, I see you describe it as an extension, but I don't understand what this patch is meant to do. CONIN$/CONOUT$/CONERR$ are not supposed to be the same things as stdin/out/err, particularly when redirection is in effect; in Win32 terms, they mean "Get me a real console, I want to talk to it no matter what". For instance, if I run this cygwin C testcase in a DOS console:

Its obvious I am not a regular windows user. :)

The closest thing to the concept I had was stdio. From what you have described I should just convert the file name CON???$ to /dev/con??? and it should work. Let me give this a try.

And thanks for the clarifications.

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]