[Info-vax] Unix equivalent of a mailbox device ?
Paul.Raulerson
Paul at Raulersons.com
Thu Nov 26 17:36:46 EST 2009
Huh, well I think you asked a slew of questions here. Perhaps you might
consider rephrasing
the question to address what you really want to do, instead of listing the
possible solutions. :)
If I understand you correctly, you are looking for a way for a process to
post some information that
one or more other processes can then use to direct their processing.
Okay -- first signals are exactly equivalent to what we would call "software
interrupts" in other platforms. They stop the current processing and go to a
handler - or in other words, they are an interrupt signal handler. Guess
that is why they are called signals. :) Naturally, an interrupt in and of
itself carries only a small amount of information, but depending upon what
you are trying to do, they are incredibly effective. Some common uses
include signaling a process to reload it's configuration information, and
forcing a process to break into a debugger. There are of course, many other
uses. SIGPIPE for example, is useful for detecting with a user has just
killed a terminal session off.
Pipes do work between processes of course, and you essentially can treat
them like files. Write to a pipe and some other process will read from the
same pipe. The "other" process can block on the read, which is very
efficient. The reading process is suspended until it actually has some work
to do.
Then you could step up to using message queues, which is what I would
probably use for situations like sending messages to a server and waiting
for a response.
Pipes and message queues can be extended over multiple machines using IP
communications, nut third party products like IBM MQ Series or the message
system from Progress will work significantly better doing that. Talking
between processes on a single machine does not need third party products.
IMNSHO that is.
That get you started well enough?
-Paul
> -----Original Message-----
> From: info-vax-bounces at rbnsn.com [mailto:info-vax-bounces at rbnsn.com] On
> Behalf Of JF Mezei
> Sent: Thursday, November 26, 2009 3:04 PM
> To: info-vax at rbnsn.com
> Subject: [Info-vax] Unix equivalent of a mailbox device ?
>
> Say on VMS I have a background process that created a mailbox with a
> systen-wide logical pointing to it. Users can use DCl to write a
> message
> to that mailbox which causes the detached process to do certain things
> with the received daya. (say the daya is anywhere between a couple of
> bytes to 110 bytes).
>
>
> When moving to Unix, what are the equivalent frameworks that one can
> use?
>
> >From what I have read, "signals" just send a number to a process.
> Correct ?
>
> Do "pipes" work between processes ? How would one process find out
> about
> another process' available pipe ? What are the unix "pipe" equivalents
> to the SYS$CREMBX, SYS$ASSIGN, SYS$QIO to interact with another
> process's pipe ?
>
> Or is the only way to exchange data via IP ?
> _______________________________________________
> Info-vax mailing list
> Info-vax at rbnsn.com
> http://rbnsn.com/mailman/listinfo/info-vax_rbnsn.com
More information about the Info-vax
mailing list