argument describes how Photon is to notify your application. If your application is using the widget library, pass NULL. For more information, see
sigevent
and
ionotify()
in the QNX Neutrino Library Reference.

PtAppAddInput()
and
name_attach()
both try to create a channel with _NTO_CHF_COID_DISCONNECT
and _NTO_CHF_DISCONNECT set (see the
QNX Neutrino Library Reference).
If your application calls both functions, you need to let Photon use the
same channel as name_attach(). To do this, call these functions in this order:

name_attach()

PhChannelAttach()

PtAppAddInput()

See the Examples section for a sample of code that illustrates the correct order.

If you want to create a separate channel for
Photon, it doesn't matter whether you create it and give it to
PhChannelAttach() before or after calling name_attach().
But keep in mind that since certain mechanisms in Photon library expect the
Photon channel to have the two DISCONNECT flags, they might not work
properly if it doesn't.
One such mechanism is the detection of broken connections (see
PtConnectionClientSetError()
and
PtConnectionServerSetError())
and anything that relies on it.