Hello.

I'm new to Linux (mostly a Win32 developer).  I am porting some code that
uses the Win32 CreateMutex in order to synchronize access to a file across
several processes.  On Win32, a mutex works across processes (not only
threads).  I remember a class I took years ago allowed file locking as a
method to sync up processes, but this method uses the file handle
(descriptor) from calls like _open to lock on.  I'm use C++ ofstream which
doesn't allow access to the actual file handle (anymore).

Using C or C++, how to I synchronize two processes?  I looked at
pthread_mutex_xxxx, but this is for threads.  Do I use a semaphore?  Seems
like overkill; I just need a binary yes or no lock.

BTW, I'm using RedHat 6.1.

Thanks for the help.

Paul <mailto:[EMAIL PROTECTED]>


-- 
To unsubscribe:
mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to