Portable Message Queues

Randy Orrison randy at umn-cs.cs.umn.edu
Thu Sep 8 02:25:06 AEST 1988


For the application I'm working on, I would like to be able to use System
V message queues, however, I have reason to believe that they are somewhat
less than universally available.  Since a major goal in this project is for
it to be portable, I need to find a similar, but more portable, mechanism.

I expect that the best I can do will be just writing messages to a file and
using some form of file locking to ensure that the file doesn't get mangled.

Is there a portable way of achieving file locking under all versions of Unix?

I believe that using open(...O_CREAT|O_EXCL) on a lock file is the best there
is.  Is this always true, and is there nothing better?

Please e-mail if the answer is non-trivial, simple, and obvious.  Please
post if you think others may be interested.

(What does POSIX say?)

	Thanks in advance...

		-randy
-- 
Randy Orrison, Chemical Computer Thinking Battery  --  randy at cctb.mn.org
randy at ux.acss.umn.edu	{bungia, uunet!hi-csc, rutgers, sun}!umn-cs!randy
	"Good morning.  Welcome to reality.  I'm afraid all our guides are
	 busy this millenium, so you'll have to take the self-guided tour."



More information about the Comp.unix.wizards mailing list