webrowser and linux (also os.execv)

Donn Cave donn at u.washington.edu
Fri Jun 11 12:09:05 EDT 2004


In article <Pine.BSI.4.58.0406101431560.9860 at malasada.lava.net>,
 Tim Newsham <newsham at lava.net> wrote:
...
> Oh, on an unrelated note, the os.execv and os.execve functions
> do not allow an empty argv to be passed in, even though the
> underlying C/Unix primitives do.  Although it is rare that
> one would want to pass in an empty argv (with argc set to zero)
> there are rare situations when this is desired.  The fact
> that python tries to protect the user from making a mistake
> by limiting the flexibility of the API is a deficiency.

On MacOS X, non-empty is a documented requirement for execve
and its C library wrappers like execv, and an attempt to use
an empty argv causes a `bus error'.  Very likely the same on
other Berkeley implementations.  I also have a hard time
imagining even a rare situation where it would make sense.

   Donn Cave, donn at u.washington.edu



More information about the Python-list mailing list