ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Proc-FastSpawn/FastSpawn.xs
(Generate patch)

Comparing Proc-FastSpawn/FastSpawn.xs (file contents):
Revision 1.5 by root, Sun Apr 28 00:49:43 2013 UTC vs.
Revision 1.6 by root, Sun Apr 28 01:10:44 2013 UTC

117 XSRETURN_UNDEF; 117 XSRETURN_UNDEF;
118 118
119 pid = xpid; 119 pid = xpid;
120 } 120 }
121#else 121#else
122 { 122 pid = (ix ? fork : vfork) ();
123 char **old_environ = environ;
124 environ = (char **)cenvp;
125 123
126 pid = vfork (); 124 if (pid < 0)
125 XSRETURN_UNDEF;
127 126
127 if (pid == 0)
128 {
128 if (pid) 129 if (ix)
129 environ = old_environ; 130 {
131 environ = (char **)cenvp;
132 execvp (path, cargv);
133 }
134 else
135 execve (path, cargv, cenvp);
130 136
131 if (pid < 0)
132 XSRETURN_UNDEF;
133
134 if (pid == 0)
135 {
136 (ix ? execvp : execv) (path, cargv);
137 _exit (127); 137 _exit (127);
138 } 138 }
139 }
140#endif 139#endif
141 140
142 RETVAL = pid; 141 RETVAL = pid;
143} 142}
144 OUTPUT: RETVAL 143 OUTPUT: RETVAL

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines