Check out PAM.
What would also be interesting is that if you open a file as binary, you don't (or at least, I would expect you didn't) get flushing on newline. Do you get fliushing on endl even though the file is binary? I know using endl on a binary file is a bit strange, but it would be interesting to find out. Unless of course endl on a binary file causes a run time error?
The OS might flush the stream with new line or might not, we can't know for sure, it might look that in 1000 cases flushes the stream and in one case, when we assume it does... the OS make us a surprise... (i saw some people surprised by this issue)
I was talking from the C/C++ programmer point of view, for us there is no guarantee that the OS will flush on new line (\n), but in case the programmer isn't "happy" with the OS flushes, he can do it when he want it.
[QUOTE=fatjuicymole;146411]Check out PAM.
what the "PAM" reffers to?
Well, you can always give root access to your program permanently, if you don't want to request it whilst running:
chown root your_app
chmod a+xs your_app
The amount of output you are expecting is irrelevant if the QProcess instance is being destroyed before you want it to be. It's also irrelevant how someone else chooses to create QProcess because it is your code with the problem, not theirs. The first example in the QProcess docs uses the heap for a long-running process, and the second uses a local (stack) variable to run a short-lived process entirely entirely within the same scope.
If anyone is still interested, here is a possible workaround for the buffer problem:
https://sites.google.com/site/marcst...output-channel
Bookmarks