Caution: This version of this document is no longer maintained. For the latest documentation, see

Changing the default behavior of printf


This technote provides information about how to modify the default behavior for the printf command from issuing a SIGSEGV to return a NULL when an error is encountered.

For more information about the printf command, see the Utilities Reference User Guide.


The purpose of this feature is for the following printf code to now generate a SIGSEGV for specific builds of lib/c/:


Instead, the result is that it will print a NULL.

Note: A SIGSEGV will continue to be the result for other builds; only specific builds are affected.

Enabling the special behavior

To enable this feature:

  1. Issues these commands:
    cd lib/c/
    make clean
    make EXCLUDE_VARIANTLIST=wcc install
  2. Build a new kernel.
  3. Reboot your system.


Since you already compile with one of these build environment options specified, BUILDENV=iox or BUILDENV=ion, it is not necessary for you to also include it in the make command; however, you are allowed to do so. For example: