www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/18/16:35:26

From: Marc Singer <nbn.nbn.com!sapien!elf>
Subject: spawnvp and the argv[]
To: nbn.nbn.com!sapien!sun.soe.clarkson.edu!djgpp (DJGPP List Alias)
Date: Fri, 15 Sep 1995 11:17:29 -0700 (PDT)

In porting RCS, I have tracked an elusive problem to the spawnvp () call.
When the name of the program to be executed is not absolute, spawnvp ()
searches the patch and replaces the original program name with the
modified version.  The trouble is that if I want to use this argv[] a
second time, my program name is not valid the next time spawnvp () is
called.

Is this behavior compatible with POSIX semantics for spawnvp?  Is
spawnvp even covered by POSIX?

I have a work-around, but I thought it might be appropriate to replace
the callers program name before returning from the function.

----------------------------------------------------------------------
          Marc Singer       | "... but when you eat this ... pear, you
       elf AT netcom DOT com       |  are rarely aware of the fact that it was
   or  elf AT sapien DOT com       |  ... plucked from the branch of this ... 
< My comments are my own. > |  pear tree." -- Charlie V.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019