Hi, On Fri, 2009-03-27 at 08:26 -0400, Ed Cashin wrote: > On Fri, Mar 27, 2009 at 02:53:49PM +0800, Tim Post wrote: > > Sorry, typo: > > > > On Fri, 2009-03-27 at 14:50 +0800, Tim Post wrote: > > > Hi, > > > > > > I was wondering why vblade used a helper script and logger instead of > > > using daemon() and syslog() directly? Also, why not use posix_fadvse() > > > with POSIX_FADV_RANDOM when -d (O_DIRECT) is not specified? I have a > > > very clunky desktop with old IDE drives, its hard for me to test if > > > doing so would actually improve things. > > > > s/_fadvse/_fadvise/ > > Hi, Tim Post. > > With "vbladed", I was probably influenced by Dan Bernstein, who says > that a process should not daemonize itself when an external program > could do it if and when necessary. It certainly does tend to make the > C code cleaner when the program is written for the general case and > can be used either way.
Why incur the overhead of a shell in a program that is designed to export multiple targets? 'sh' can point to many things. As for logger, why not use the system syslog facility directly? > Regarding fadvise, I am not sure whether POSIX_FADV_RANDOM would be > helpful, especially since the user might intend to do mostly > sequential accesses. It might be interesting to hear about cases > where it does (and doesn't) help, though. posix_fadvise() doesn't give us many choices, so it should be called assuming the worst case scenario. As for when it does and doesn't help, I'm now looking into that. However you answered my question, using it was not ruled out due to someone else looking into it :) So, I'll look into it. Cheers, --Tim ------------------------------------------------------------------------------ _______________________________________________ Aoetools-discuss mailing list Aoetools-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/aoetools-discuss