6 Mar
2007
6 Mar
'07
9:06 p.m.
On Thu, 2007-03-01 at 14:42 +0100, Nicolas Boullis wrote:
- system() waits for the command execution to finish. I think fork() +exec() would be better.
I tend to disagree here: it might be interesting to catch potential errors while running the command, which requires to wait.
But what could be done if the command fails? It probably doesn't affect the quota calculation, so it would be possible to fork+exec and then run waitpid() later to find out the exit status. Hmm. I should maybe add io_add_child() to my I/O loop code to make this easy :)
On the other hand, if the admin does not care and does not want to wait, a single & at the end of the command would do it.
Well, yes.. Although it's still a bit slower (starts extra /bin/sh and waits for it to finish).