Send Block When Calling spawnlp

I have a couple functions that spawn or kill our embedded ntpd daemon,
depending on the operator’s selection. When spawnlp is called to start ntpd,
it send blocks on the parent process. I understand that if I were using
ConnectAttach incorrectly in the parent, the child process would attempt to
duplicate the fd and send block.

I’m using name_attach instead. Will that give the same behavior as
ConnectAttach? What is the workaround, as _NTO_SIDE_CHANNEL doesn’t appear
to be an acceptable argument to name_attach?

Thanks,
David Kuechenmeister

So you are calling name_attach() to yourself then?

chris


David Kuechenmeister <david.kuechenmeister@viasat.com> wrote:

I have a couple functions that spawn or kill our embedded ntpd daemon,
depending on the operator’s selection. When spawnlp is called to start ntpd,
it send blocks on the parent process. I understand that if I were using
ConnectAttach incorrectly in the parent, the child process would attempt to
duplicate the fd and send block.

I’m using name_attach instead. Will that give the same behavior as
ConnectAttach? What is the workaround, as _NTO_SIDE_CHANNEL doesn’t appear
to be an acceptable argument to name_attach?

Thanks,
David Kuechenmeister


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Wrong function, my mistake. I’m not calling ConnectAttach in the thread that
tries to spawnlp(), nor am I using name_attach. I’m calling name_open to
connect as a client to another process. How will this affect spawnlp()?

Thanks,

“Chris McKillop” <cdm@qnx.com> wrote in message
news:avcc99$b24$1@nntp.qnx.com

So you are calling name_attach() to yourself then?

chris


David Kuechenmeister <> david.kuechenmeister@viasat.com> > wrote:
I have a couple functions that spawn or kill our embedded ntpd daemon,
depending on the operator’s selection. When spawnlp is called to start
ntpd,
it send blocks on the parent process. I understand that if I were using
ConnectAttach incorrectly in the parent, the child process would attempt
to
duplicate the fd and send block.

I’m using name_attach instead. Will that give the same behavior as
ConnectAttach? What is the workaround, as _NTO_SIDE_CHANNEL doesn’t
appear
to be an acceptable argument to name_attach?

Thanks,
David Kuechenmeister


\

Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

I’ve turned this in as a problem report. I’ll post the results when I get
the problem resolved.
…dk

“Chris McKillop” <cdm@qnx.com> wrote in message
news:avcc99$b24$1@nntp.qnx.com

So you are calling name_attach() to yourself then?

chris


David Kuechenmeister <> david.kuechenmeister@viasat.com> > wrote:
I have a couple functions that spawn or kill our embedded ntpd daemon,
depending on the operator’s selection. When spawnlp is called to start
ntpd,
it send blocks on the parent process. I understand that if I were using
ConnectAttach incorrectly in the parent, the child process would attempt
to
duplicate the fd and send block.

I’m using name_attach instead. Will that give the same behavior as
ConnectAttach? What is the workaround, as _NTO_SIDE_CHANNEL doesn’t
appear
to be an acceptable argument to name_attach?

Thanks,
David Kuechenmeister


\

Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/