Date: Wed, 21 Feb 1996 18:37:09 -0500 From: dj (DJ Delorie) Message-Id: <199602212337.SAA07025@delorie.com> To: morphine AT blaze DOT cs DOT jhu DOT edu CC: djgpp AT delorie DOT com In-reply-to: <01BB0062.38D68B00@hf2rules.res.jhu.edu.res.jhu.edu> (morphine@blaze.cs.jhu.edu) Subject: Re: spawnlp() vs system() > I have a DJGPP v1.11 program that calls a v2 program using the = > spawnlp() function. However, whenever it tries to spawn this particular = > program, I briefly get a segmentation violation message and execution is = > quickly restored to the calling program. However, when I replaced the = > spawnlp() function with a system() instead, now it works. Why the = > difference? V1's spawn*() tries to run the program directly (to pass the arguments correctly), and dies because it doesn't know how. system() always runs it as a regular EXE. V2 can always run a V1 program correctly, though.