Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Mar 1998 16:34:41 -0500
From:      Matthew Hagerty <wpub1@net-link.net>
To:        freebsd-questions@FreeBSD.ORG
Subject:   open(), fopen(), and flock()
Message-ID:  <3.0.3.32.19980310163441.031536ec@smtp.net-link.net>

next in thread | raw e-mail | index | archive | help
Greetings,

   Could someone tell me if you can use flock() to lock a file opened with
fopen()?  I have read some texts that say UN*X open() is not ANSI-C and to
use fopen() is possible.  Unfortunately every text I look in avoids
concurrence like the plague and I cannot dig up much info on flock() (other
than the man page).

   If flock() cannot be used with fopen(), then what do you use to lock a
file opened with fopen()?

   Is there some reason to use fopen() over open() or vice/versa?  Is there
even any locking mechanisms in ANSI-C?

   Any insight would be greatly appreciated.  Thank you.

Matthew



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.3.32.19980310163441.031536ec>