Question re IPC and signals

I am just getting started with QNX 4.25 and am planning to set up a server
process using IPC messaging. “QNX Operating System, System Architecture”
warns about an interaction between signals and messages–if a process is
SEND- or RECEIVE-blocked and receives a signal, this will unblock and cause
the send or receive to return with an error. It also says that “it’s
possible for a process acting as a server (i.e., it is receiving messages)
to ask that it be notified when a client process is signaled while in the
REPLY-blocked state. In this case, the client process is made
SIGNAL-blocked with a pending signal and the server process receives a
special message describing the type of signal.” I’m not sure whether this
is something I will need to deal with or not, but the problem is that I
cannot find anything in the documentation that tells me how to do what is
described here. Can anybody tell me how you do this, or where to find it in
the documentation?

Thanks,
Bill Ghrist

I can’t lay my hands on everything you need, but this may get you
through the evening.

You will need some of the structs in <sys_msg.h> and <sys/psinfo.h>.
There is a description in the manual …/sysarch/microkernel.html in
its section “Signals and Messages”.

The receive process needs to have the _PPF_SIGCATCH flag set, and maybe
the _PPF_SERVER flag as well - I don’t remember.

If *(ushort *)&msgbuf == _SYSMSG then check if
sysmsg->subtype == _SYSMSG_SUBTYPE_SIGNAL. Look at
struct _sysmsg_signal to deduce the signal #.

Maybe someone else can point you to additional docs.

Richard

Bill Ghrist wrote:

I am just getting started with QNX 4.25 and am planning to set up a server
process using IPC messaging. “QNX Operating System, System Architecture”
warns about an interaction between signals and messages–if a process is
SEND- or RECEIVE-blocked and receives a signal, this will unblock and cause
the send or receive to return with an error. It also says that “it’s
possible for a process acting as a server (i.e., it is receiving messages)
to ask that it be notified when a client process is signaled while in the
REPLY-blocked state. In this case, the client process is made
SIGNAL-blocked with a pending signal and the server process receives a
special message describing the type of signal.” I’m not sure whether this
is something I will need to deal with or not, but the problem is that I
cannot find anything in the documentation that tells me how to do what is
described here. Can anybody tell me how you do this, or where to find it in
the documentation?

Thanks,
Bill Ghrist

Is there a special reason that you don’t work with Proxies?
I think in most cases it is possible to work with Proxies instead of signals.

Dieter

Bill Ghrist schrieb:

I am just getting started with QNX 4.25 and am planning to set up a server
process using IPC messaging. “QNX Operating System, System Architecture”
warns about an interaction between signals and messages–if a process is
SEND- or RECEIVE-blocked and receives a signal, this will unblock and cause
the send or receive to return with an error. It also says that “it’s
possible for a process acting as a server (i.e., it is receiving messages)
to ask that it be notified when a client process is signaled while in the
REPLY-blocked state. In this case, the client process is made
SIGNAL-blocked with a pending signal and the server process receives a
special message describing the type of signal.” I’m not sure whether this
is something I will need to deal with or not, but the problem is that I
cannot find anything in the documentation that tells me how to do what is
described here. Can anybody tell me how you do this, or where to find it in
the documentation?

Thanks,
Bill Ghrist

Dieter Schemmelmann <Dieter@schemmelmann.de> wrote:

I missed the originial message – but look at qnx_pflags(_PPF_SIGCATCH)
and <sys/sys_msg.h> for what the message looks like.

Essentially you handle it by determining that you got a message
of type system, subtype signal (check header for exact names)
and look at the pid returned from the Receive() to know which client
got hit by a signal. The client won’t be unblocked until you reply.

Or, often, if the client might get signals, it can mask signals
around any blocking operations, or only unblock signals in a safe
section.

-David

Is there a special reason that you don’t work with Proxies?
I think in most cases it is possible to work with Proxies instead of signals.

Dieter

Bill Ghrist schrieb:

I am just getting started with QNX 4.25 and am planning to set up a server
process using IPC messaging. “QNX Operating System, System Architecture”
warns about an interaction between signals and messages–if a process is
SEND- or RECEIVE-blocked and receives a signal, this will unblock and cause
the send or receive to return with an error. It also says that “it’s
possible for a process acting as a server (i.e., it is receiving messages)
to ask that it be notified when a client process is signaled while in the
REPLY-blocked state. In this case, the client process is made
SIGNAL-blocked with a pending signal and the server process receives a
special message describing the type of signal.” I’m not sure whether this
is something I will need to deal with or not, but the problem is that I
cannot find anything in the documentation that tells me how to do what is
described here. Can anybody tell me how you do this, or where to find it in
the documentation?

Thanks,
Bill Ghrist


QNX Training Services
I do not answer technical questions by email.

I found something regarding that matter on Frank Kolnick book “The QN4
Realtime OS”, page 766, it gave me a good idea how to deal with
The book is listed in www.amazon.com
Oscar

Richard R. Kramer <rrkramer@kramer-smilko.com> escribió en el mensaje de
noticias 3BF99B86.4CCCE8D3@kramer-smilko.com

I can’t lay my hands on everything you need, but this may get you
through the evening.

You will need some of the structs in <sys_msg.h> and <sys/psinfo.h>.
There is a description in the manual …/sysarch/microkernel.html in
its section “Signals and Messages”.

The receive process needs to have the _PPF_SIGCATCH flag set, and maybe
the _PPF_SERVER flag as well - I don’t remember.

If *(ushort *)&msgbuf == _SYSMSG then check if
sysmsg->subtype == _SYSMSG_SUBTYPE_SIGNAL. Look at
struct _sysmsg_signal to deduce the signal #.

Maybe someone else can point you to additional docs.

Richard

Bill Ghrist wrote:

I am just getting started with QNX 4.25 and am planning to set up a
server
process using IPC messaging. “QNX Operating System, System
Architecture”
warns about an interaction between signals and messages–if a process is
SEND- or RECEIVE-blocked and receives a signal, this will unblock and
cause
the send or receive to return with an error. It also says that “it’s
possible for a process acting as a server (i.e., it is receiving
messages)
to ask that it be notified when a client process is signaled while in
the
REPLY-blocked state. In this case, the client process is made
SIGNAL-blocked with a pending signal and the server process receives a
special message describing the type of signal.” I’m not sure whether
this
is something I will need to deal with or not, but the problem is that I
cannot find anything in the documentation that tells me how to do what
is
described here. Can anybody tell me how you do this, or where to find
it in
the documentation?

Thanks,
Bill Ghrist