Subject: Re: make print-PLIST and pkg_add use different quote/escape conventions
To: J Chapman Flack <>
From: Hubert Feyrer <>
List: tech-pkg
Date: 03/13/2005 22:17:32
On Sun, 13 Mar 2005, J Chapman Flack wrote:
> Hmm ... of course & belongs to the set of shell metacharacters that are
> not wildcards, so I wouldn't expect this behavior of a function that simply
> tried to replicate the wildcard-globbing behavior of the shell.  It looks
> more likely that the command is genuinely being seen by the shell.

I'm not sure what a shell is needed for there:

 	add/futil.c:                    if (fexec("mkdir", dir, NULL))
 	add/perform.c:                                          (void) fexec("mkdir", "-p", p->name, NULL);
 	add/perform.c:          if (fexec("mkdir", "-p", dbdir, NULL)) {

Looking at fexec()'s source, it just seems to call execvp(), which is 
documented to search $PATH, I wonder if it spawns a full shell for that.

  - Hubert

NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)