An interesting behaviour in printf

Doug Gwyn gwyn at smoke.BRL.MIL
Wed Mar 22 13:18:59 AEST 1989


In article <4273 at xyzzy.UUCP> throopw at agarn.dg.com (Wayne A. Throop) writes:
>I'd druther do something close to
>    kill( getpid(), SIGSEGV );
>in such a case.

I've had another similar suggestion mailed to me.

All I can say is, my experience with this has been that printing "(null)"
has not encouraged non-portable coding here (but then I try to stamp it
out anyway), and letting the application continue to run has usually been
more helpful than harmful.  Normally upon seeing "(null)" in output where
some meaningful string was expected, the software maintainer fixes the
null pointer bug and no damage was done.



More information about the Comp.lang.c mailing list