kill use to check vid status

Can kill be used to check the status of a vid?

If I have a virtual circuit vid can I call kill( vid, 0 ) to check the
status of the vid? Will it check both ends to ensure the processes attached
to either end are alive?

Thanks,

Richard

Brown, Richard <brownr@aecl.ca> wrote:

Can kill be used to check the status of a vid?

If I have a virtual circuit vid can I call kill( vid, 0 ) to check the
status of the vid? Will it check both ends to ensure the processes attached
to either end are alive?

I’d expect it to work and do that. Of course… you could always write
a little test program for this, just to make sure.

(Spawn a child on another node, then just use a kill() on the pid
returned from the spawn. See if it works, then do a kill() with
a real signal to terminate the child, then try another kill() on
it. Hm… you might have to do a waitpid() to handle cleanup before
the vc is detached, not sure.)

-David

QNX Training Services
dagibbs@qnx.com

Yeah this doesn’t work for vids. It looks like kill used in this instance
will only return non zero when netpoll kicks in and tears down the VC
(essentially invalidating the PID on the local side). Oh well it was a nice
try. I guess I will have to stick with the old qnx_name_locate,
qnx_vc_detach to check the aliveness of a remote process, unless anyone has
a better way.

Brown, Richard <> brownr@aecl.ca> > wrote:
Can kill be used to check the status of a vid?

If I have a virtual circuit vid can I call kill( vid, 0 ) to check the
status of the vid? Will it check both ends to ensure the processes
attached
to either end are alive?

I’d expect it to work and do that. Of course… you could always write
a little test program for this, just to make sure.

(Spawn a child on another node, then just use a kill() on the pid
returned from the spawn. See if it works, then do a kill() with
a real signal to terminate the child, then try another kill() on
it. Hm… you might have to do a waitpid() to handle cleanup before
the vc is detached, not sure.)

-David

QNX Training Services
dagibbs@qnx.com