Date: Wed, 13 Jun 2007 17:35:55 +0200 From: Joerg Sonnenberger <joerg@britannica.bec.de> To: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Using shell commands versus C equivalents Message-ID: <20070613153555.GA4439@britannica.bec.de> In-Reply-To: <46700CAE.6020902@u.washington.edu> References: <466F86C6.7010006@u.washington.edu> <20070613123213.GE98927@bunrab.catwhisker.org> <E1HySxb-000PIg-89@cs1.cs.huji.ac.il> <46700CAE.6020902@u.washington.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 13, 2007 at 08:26:38AM -0700, Garrett Cooper wrote: > 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 )); You supposedly mean stat + chmod here, right? Trivial errors like this are easy to make. > Next step, eliminating the linked list structure in favor or red-black > trees, maybe. Due to the way pkg_install works, this most likely is just adding complexity for no gain, it might actually slow it down. Joerg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070613153555.GA4439>