Skip navigation.
Home
The QNX Community Portal

View topic - sin,psin,procnto messages

sin,psin,procnto messages

Read-only archive of qnx.rtos (Writing resources managers, and general discussion around the QNX Neutrino RTOS) at inn.qnx.com

sin,psin,procnto messages

Postby Francois Joubert » Fri Sep 14, 2007 6:58 am

I have a service waiting for messages:

rcvid = MsgReceive(...

I get messages from sin, psin and procnto(pid=1). My message structure
will not allow these messages to cause any harm, but why do they send
these messages and what is the response they require?

Francois
Francois Joubert
 

Re: sin,psin,procnto messages

Postby Colin Burgess » Fri Sep 14, 2007 1:56 pm

They are most likely IO_DUP and IO_FDINFO messages.

You should set the _NTO_SIDE_CHANNEL flag on your channel to indicate that your channel is not an 'fd'.

Colin

Francois Joubert wrote:
I have a service waiting for messages:

rcvid = MsgReceive(...

I get messages from sin, psin and procnto(pid=1). My message structure
will not allow these messages to cause any harm, but why do they send
these messages and what is the response they require?

Francois

--
cburgess@qnx.com
Colin Burgess
 

Re: sin,psin,procnto messages

Postby Francois Joubert » Mon Sep 17, 2007 11:53 am

Colin Burgess wrote:
They are most likely IO_DUP and IO_FDINFO messages.

You should set the _NTO_SIDE_CHANNEL flag on your channel to indicate
that your channel is not an 'fd'.

Colin

Francois Joubert wrote:
I have a service waiting for messages:

rcvid = MsgReceive(...

I get messages from sin, psin and procnto(pid=1). My message structure
will not allow these messages to cause any harm, but why do they send
these messages and what is the response they require?

Francois

Thank you for the info. My problem however was that I use name_attach in

this instance. I did not handle received messages properly as clearly
described in the documentation.
Francois Joubert
 

Re: sin,psin,procnto messages

Postby Colin Burgess » Mon Sep 17, 2007 2:02 pm

You can setup your own channel, and the use

dispatch_t *_dispatch_create(int chid, unsigned flags);

instead of the normal dispatch_create().

Francois Joubert wrote:
Colin Burgess wrote:
They are most likely IO_DUP and IO_FDINFO messages.

You should set the _NTO_SIDE_CHANNEL flag on your channel to indicate
that your channel is not an 'fd'.

Colin

Francois Joubert wrote:
I have a service waiting for messages:

rcvid = MsgReceive(...

I get messages from sin, psin and procnto(pid=1). My message
structure will not allow these messages to cause any harm, but why do
they send these messages and what is the response they require?

Francois

Thank you for the info. My problem however was that I use name_attach in
this instance. I did not handle received messages properly as clearly
described in the documentation.

--
cburgess@qnx.com
Colin Burgess
 

RE: Re: sin,psin,procnto messages

Postby qnxloader » Tue Sep 18, 2007 6:57 am

When you do name_open, coid will be start from _NTO_SIDE_CHANNE, so you should not get IO_DUP and IO_FDINFO from utilities sin, ...; am I right?
qnxloader
Senior Member
 
Posts: 206
Joined: Mon Oct 06, 2003 8:29 am

Re: sin,psin,procnto messages

Postby Francois Joubert » Tue Sep 18, 2007 11:41 am

qnxloader wrote:
When you do name_open, coid will be start from _NTO_SIDE_CHANNE, so
you should not get IO_DUP and IO_FDINFO from utilities sin, ...; am
I right?

I received _IO_DEVCTL messages.


Francois
Francois Joubert
 

Re: sin,psin,procnto messages

Postby kwschumm » Tue Sep 18, 2007 1:35 pm

"Francois Joubert" <sommerfj@webmail.co.za> wrote in message
news:fcod24$1c8$1@inn.qnx.com...
qnxloader wrote:
When you do name_open, coid will be start from _NTO_SIDE_CHANNE, so
you should not get IO_DUP and IO_FDINFO from utilities sin, ...; am
I right?

I received _IO_DEVCTL messages.

The QNX doc and examples for using name_open do seem to be incomplete. Using
the 'on' utility with such code also cause these messages to be sent. I've
always had to ignore _IO_DEVCTL and _IO_DUP when using name_open().
kwschumm
Senior Member
 
Posts: 306
Joined: Fri Sep 17, 2004 12:46 pm

Re: sin,psin,procnto messages

Postby David Gibbs » Tue Oct 09, 2007 8:50 pm

Francois Joubert <sommerfj@webmail.co.za> wrote:
qnxloader wrote:
When you do name_open, coid will be start from _NTO_SIDE_CHANNE, so
you should not get IO_DUP and IO_FDINFO from utilities sin, ...; am
I right?

I received _IO_DEVCTL messages.

You shouldn't, true. But qconn, sin, pidin, etc aren't neccessarily as
bright as they should be about not issuing queries on things that aren't
fds.

A general principle in ALL servers: if you get a message that you don't
understand/expect, return an error. I tend to prefer:

MsgError(rcvid, ENOSYS);

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com
David Gibbs
 


Return to qnx.rtos

Who is online

Users browsing this forum: No registered users and 1 guest