On Fri, Mar 27, 2009 at 08:44:42PM +0800, Tim Post wrote: ... > > 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?
I doubt the shell, which just runs once, adds measurable overhead, especially considering that its cost will be lost in the constant costs. If vblade daemonized itself it would still need to double fork. Both the shell process and the logger will spend most of their time sleeping, and if the system really needs the resources, their pages will get paged out to disk. I don't think this cost makes a real difference to the user in any situation. The overhead of code complexity, though, is a consideration, especially for the vblade, where minimalism is the esthetic. A simple implementation is more readable and maintainable. It is easier to get right. -- Ed Cashin <ecas...@coraid.com> Find experimental aoe Linux driver patches at http://coraid.typepad.com/aoe_linux_proving_grounds/ ------------------------------------------------------------------------------ _______________________________________________ Aoetools-discuss mailing list Aoetools-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/aoetools-discuss