S
santosh
CBFalconer said:Why shouldn't the OS have a provision: I won't display the output
unless the program completes successfully?
Perhaps, but since OP's code returns an undefined termination status, we
cannot know for sure what that status was. It could have returned
whatever is the code for "successful completion", or it might not have.
The Standard doesn't say anything, as far as I'm aware, about the
further behaviour of a program which returns an undefined termination
status value. That is left up to the host. It's also the stated intent
of the standard that unbuffered and line buffered output appear as soon
as possible and that all data be written to files. Thus I would say
that it's most unlikely for the OP's code to produce any unexpected
behaviour outside of a clc-designed DS9000.