... > Sorry -- actually I meant that (along similar lines), there was a > program with the following lines: > > vsystem("/bin/chmod +x %s", filename); > > and I replaced it with: > > chmod(filename, (mode_t) ( S_IXUSR | S_IXGRP | S_IXOTH )); > > Probably won't yield much gain overall, but every drop counts and there > are quite a few iterations performed in the pkg_* programs, in > particular dealing with X.org.
chmod is one(1) system call, while system is many, for starters it's fork/exec, which btw, is quiet expensive, haven't counted, but my gut feeling it's in the 10s. So, if the program does this chmod once in a blue moon, there is no real argument, but if id does it many times, then one system call is a real winner, danny _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"