Date: Mon, 4 May 1998 15:29:03 -0700 (PDT) From: Doug White <dwhite@gdi.uoregon.edu> To: Leif Neland <leifn@internet.dk> Cc: questions@FreeBSD.ORG Subject: Re: how to lock file opened by vi/joe Message-ID: <Pine.BSF.3.96.980504152730.23827K-100000@gdi.uoregon.edu> In-Reply-To: <Pine.BSF.3.96.980504233516.1991A-100000@darla.swimsuit.roskildebc.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 May 1998, Leif Neland wrote: > I want to make a cgiscript append a line to a file, but sometimes this > file is opened by the editor joe. Wouldn't it be easier to do echo "line" >> /path/to/file? > How do I prevent the script from writing to this file when it is already > open? caveat emptor. If you need to edit the file then modify a private copy. If you want to be careful about this have yor script drop a lockfile while it's editing the file. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major 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?Pine.BSF.3.96.980504152730.23827K-100000>