FpDebug and "run without debug" use TProcess. Gdb does not (obviously).
That's right, now I remember you wanted me to test that. Using FpDebug and "run without debug", no writeln(s) and the app crashes with a memory access violation. It's sort of nice that the behavior is identical if the debugger is set to gdb and still "run without debug".
What is however strange is that - If I understand right - it is just the one app. Since the fpc part is about how winapi is called, it should be all apps or none.
I just tried it with another app (hadn't tried that before) and the result is the same, with FpDebug, no writeln output, with gdb, writeln works as expected. See screenshots.
Btw, you don't use thread, and write from different threads? (just on an off chance).
Neither app is mine, IOW, I didn't write either of them (the first one is Jde. I believe the first app is not multi-threaded and, I am sure the second one isn't.
I don't think it is up to compiler details and paremeters, it is simply messing with std pipes.
I think you're right. Something seems to go wrong with the input/output handles/pipes when using FpDebug. The second app failed with an "invalid handle" on the readln.
At this point, I am inclined to believe the problem is FPC stdin/out related. I'll wait till tomorrow for further testing.
ETA:
added missing/forgotten attachments.