http://qs321.pair.com?node_id=464311


in reply to Reopen file when contents changed?

if you're on a unix/linux system, you'ld be better off with a shell script.

language is a virus from outer space.

Replies are listed 'Best First'.
Re^2: Reopen file when contents changed?
by bofh_of_oz (Hermit) on Jun 07, 2005 at 14:34 UTC
    Possibly, but AFAIK forking a shell requires resources, which will impact the measurements; opening a file will not...

    --------------------------------
    An idea is not responsible for the people who believe in it...

      Forking anything would require resources... There is no need to fork just to read the contents of a file. But anyway, I think keeping the file open and just seek(0) is easier than opening the file everytime. I don't know how much impact open() would generate on load, but I do think seek(0) would cause even less impact.
Re^2: Reopen file when contents changed?
by salva (Canon) on Jun 07, 2005 at 14:33 UTC
    why?