user-pic

Jason

  • About: I blog about Perl.
  • Commented on Suprisingly hard task of writing logs
    Are log lines fixed length or variable length? You mentioned in one post your writing 'Storable' images?...
  • Commented on Suprisingly hard task of writing logs
    I seem to have glazed over that part you wrote about locking both times :) You're right, multiple processes opening a file have no POSIX primitives to atomically modify it file. However, the vfs layer guarantees that rename() is atomic....
  • Commented on Suprisingly hard task of writing logs
    Since it seems like this is all your code, can't you just use the 'advisory' locking flock() utilizes? The warning that it's merely advisory is moot here: if you control all the programs writing to this log file, you can...
  • Commented on Suprisingly hard task of writing logs
    Multiple process writing to a single file without any kind of locking or single-threaded writer is a recipe for disaster. At first glance it looks dangerously easy to believe that write() or print() is atomic. As you are discovering, that...
  • Commented on What are your environment settings for Unicode?
    Markus Kuhn has an excellent resource on UTF-8 On POSIX-like systems: http://www.cl.cam.ac.uk/~mgk25/unicode.html Included in that demo is http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt Which is a handy file to have around to test if your terminal is configured for UTF-8, and/or what fonts you are...
Subscribe to feed Recent Actions from Jason

Subscribe to feed Responses to Comments from Jason

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.