From: Brian Candler Date: 2009-06-29T19:16:10+09:00 Subject: Re: Need Advice Help On Parsing A File Ryan Davis wrote: > On Jun 28, 2009, at 01:05 , Robert Klemme wrote: > >> I assume for mbox files there is an established protocol how the >> file locking works. You'll probably find it somewhere on the web or >> someone more knowledgeable than me posts information here. > > Unfortunately, no. It is server (both smtp and imap) and OS dependent. > sucks. There are a handful of variants (from top of head: flock locking, and dot-file locking). The best way of checking is to look at the source code of something which accesses mbox files, and see what they do. e.g. an MTA like exim (which has very clear source code), or an MUA like mutt or pine. All these are written in C. Alternatively, if you have control over the problem domain, consider changing to Maildir. -- Posted via http://www.ruby-forum.com/.