Re: HEADS UP: Win32/OS2/BeOS native ports
igor.kovalenko@motorola.com
From: "Igor Kovalenko" <Igor.Kovalenko@motorola.com>
To: "Matthew Kirkwood" <matthew@hairy.beasts.org>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "Marc G. Fournier" <scrappy@hub.org>, "mlw" <markw@mohawksoft.com>, <pgsql-hackers@postgresql.org>
Date: 2002-05-09T02:53:15Z
Lists: pgsql-hackers
Ahh... you want a named semaphore... There is such a thing in POSIX but it is only portable if their names begin with "/" (which tells OS to put it where appropriate). I believe without leading slash they end up in current directory, but we can't rely on that... too bad. Glad UDS it is getting supported on my platform, lol ;) This will however leave QNX4 in the dust, if anyone cares. And most likely BeOS, MP/X and half dozen other platforms. Which prompts me to think if it would not be better to come up with a platform independent 'namespace sync' mechanism. Can't we use fcntl()-based lock for that purpose? That's what apache is doing apparently (one of variants). -- igor > On Wed, 8 May 2002, Igor Kovalenko wrote: > > > Can you be more specific? What required syntax? I was talking about > > named pipe vs UDS socket... > > Sorry, I meant semantics. > > A pipe can have multiple readers and multiple writers. This is > no use for us. > > A listening SOCK_STREAM Unix domain socket can have no readers or > writers, but only one listener (well, except that other processes > can inherit or be passed the socket). You have to connect() (and > the server must accept()) before read and write do anything. But > we have no use for that here. It's just an exclusive-only mutex > whose namespace is the filesystem. > > It really is like a TCP socket, except that the address namespace > is the filesystem, and thus it's not available remotely. > > Think of it as a TCP socket without the "which address and port > do I use, and how do I keep it secure" issues. > > Matthew. >