- Timestamp:
- 2010-05-27T11:32:46+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/runtime-src/src/recpt/os_process_unix.cpp
r22178 r22183 38 38 39 39 #include <unistd.h> 40 #include <sys/wait.h> 40 41 41 42 #include "os_process_unix.h" 42 43 43 osprocessunix::osprocessunix(char* cmdline, OSProcessPipeMode mode) 44 osprocessunix::osprocessunix(OSProcessPipeMode mode, 45 char* prog_name, char* argv[], char* envp[]) 44 46 : child_stdout_read_(-1), child_stdin_write_(-1), 45 osprocess( cmdline,mode)47 osprocess(mode,prog_name,argv,envp) 46 48 { 47 49 … … 112 114 113 115 114 // execvp? 115 execve(cmdline, NULL, NULL); 116 116 // Used to be execve(), but this would appear not to search path for 117 // 'prog_name'. The alternative execvp() does search PATH and so is 118 // more compatible with how CreateProcess works for Windows 119 120 // Need to connect envp with externally defined '**environ' ?? 121 122 execvp(prog_name,argv); 117 123 118 124 } … … 178 184 179 185 180 186 void osprocessunix::wait() 187 { 188 int child_status; 189 //cerr << "**** waiting ..." << endl; 190 ::waitpid(pid_,&child_status,0); 191 192 //cerr << "*** exit status = " << WEXITSTATUS(child_status) << endl; 193 194 //cerr << "**** done" << endl; 195 } 196 197 181 198 bool osprocessunix::close_write_pipe(OSProcessWarnStatus warn_status) 182 199 {
Note:
See TracChangeset
for help on using the changeset viewer.