Re: puts doesn't show up in multilog

Daryl Tester <[email protected]> Thu, 13 Aug 2009 22:00:15 +0930
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
(* Reply-to munged *)

richard lucassen wrote:

> I've got a small C program that writes a string to sdtout.
> 
> When starting ./run by hand, the message shows up. When running
> supervised, nothing is logged. I added an "echo -e "starting program" to
> the run file and this messages is logged. So the multilog is reading
> stdout/stderr. Anyone an idea of what is happening?

Not flushing the output?  The stdio library might be recognising that
you're not writing to a tty and performing "excessive buffering".  Try
an "fflush(stdout)" after your puts().  If that fixes it, then you can
alter the buffering semantics with of that stream with setvbuf() or
equivalent.

-- 
Regards,
  Daryl Tester

"Crush! Kill! Deploy!"  -- Lost In Space I.T. Dept.