[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: fork or printf problem

Sumit Rangawala forced the electrons to say:
> running the output executable of the following program as
> $a.out
> and
> $a.out > test
> give different results
> WHY??

Buffering. Read man setbuf for the full story. In particular, stdout,
when directed to a terminal, is line buffered, but when directed to a
file is block buffered.