in reply to (Ovid) Re: CGI Form processing
in thread CGI Form processing

If you're sure that the data you're appending is under BUFSIZ chars (like 8192 on most modern Unix systems), you can use syswrite and avoid the flock, because append-writes are atomic. Saves a few steps, anyway.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
(tye)Re: CGI Form processing
by tye (Sage) on Jun 29, 2001 at 21:27 UTC

    As I recall, if you use syswrite, then the value of BUFSIZ doesn't matter. BUFSIZ matters if you allow buffering or if you are using pipes.

            - tye (but my friends call me "Tye")
      Ahh, I was mixing up what happens with FIFOs (pipes). Only BUFSIZ bytes on a FIFO are guaranteed to be atomically readable.

      Thanks for clarification.

      -- Randal L. Schwartz, Perl hacker