Hi all
I am writing a driver for an “ATM over STM-1” card, which acts as a
server for a number of client processes which would open ATM VCCs on the
ATM line.
I would like to get notified when any of these clients terminates, so I
can perform some cleanup of internal resources allocated to the client
itself.
SIGCHLD/wait/waitpid are not the right solutions for me, because client
processes are not children of the driver.
Thanks in advance.
Davide
–
/------------------------------------------------------------
- Davide Ancri - Prisma Engineering
- email = davidea AT prisma DASH eng DOT it
------------------------------------------------------------/
Davide <doesnot@exist.spam> wrote:
Hi all
I am writing a driver for an “ATM over STM-1” card, which acts as a
server for a number of client processes which would open ATM VCCs on the
ATM line.
I would like to get notified when any of these clients terminates, so I
can perform some cleanup of internal resources allocated to the client
itself.
SIGCHLD/wait/waitpid are not the right solutions for me, because client
processes are not children of the driver.
How do the clients find the server? If the server is an io-manager
(handles open() request), then you are guaranteed a close message
anytime a client terminates.
That is your best solution.
If that is not the case, or you can not re-structure your driver that way,
you can set the _PPF_INFORM process flag using qnx_pflags(). This will
request notification of ALL process deaths. You MUST handle (Reply() to)
them (death notification messages) on a timely basis (otherwise it can
introduce system instability). You can not fork/spawn new children when
this flag is set.
-David
QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.