argv[argc] = NULL;
// do execute the command
+#if wxUSE_UNICODE
+ long lRc = -1;
+#else
long lRc = wxExecute(argv, flags, process);
+#endif
// clean up
argc = 0;
// ----------------------------------------------------------------------------
// wxExecute: the real worker function
// ----------------------------------------------------------------------------
+#ifdef __VMS
+#pragma message disable codeunreachable
+#endif
long wxExecute(wxChar **argv,
int flags,
}
else if ( pid == 0 ) // we're in child
{
-#if wxUSE_GUI
- // reading side can be safely closed but we should keep the write one
- // opened
- pipeEndProcDetect.Detach(wxPipe::Write);
-#endif // wxUSE_GUI
-
// These lines close the open file descriptors to to avoid any
// input/output which might block the process or irritate the user. If
// one wants proper IO for the subprocess, the right thing to do is to
if ( fd != STDERR_FILENO )
close(fd);
}
+ }
#ifndef __VMS
- if ( flags & wxEXEC_MAKE_GROUP_LEADER )
- {
- // Set process group to child process' pid. Then killing -pid
- // of the parent will kill the process and all of its children.
- setsid();
- }
-#endif // !__VMS
+ if ( flags & wxEXEC_MAKE_GROUP_LEADER )
+ {
+ // Set process group to child process' pid. Then killing -pid
+ // of the parent will kill the process and all of its children.
+ setsid();
}
+#endif // !__VMS
+
+#if wxUSE_GUI
+ // reading side can be safely closed but we should keep the write one
+ // opened
+ pipeEndProcDetect.Detach(wxPipe::Write);
+ pipeEndProcDetect.Close();
+#endif // wxUSE_GUI
// redirect stdin, stdout and stderr
if ( pipeIn.IsOk() )
return exitcode;
#endif // wxUSE_GUI
}
+
+ return ERROR_RETURN_CODE;
}
+#ifdef __VMS
+#pragma message enable codeunreachable
+#endif
#undef ERROR_RETURN_CODE
#undef ARGS_CLEANUP
#if defined(HAVE_STATFS) || defined(HAVE_STATVFS)
// the case to "char *" is needed for AIX 4.3
wxStatFs fs;
- if ( statfs((char *)path.fn_str(), &fs) != 0 )
+ if ( statfs((char *)(const char*)path.fn_str(), &fs) != 0 )
{
- wxLogSysError("Failed to get file system statistics");
+ wxLogSysError( wxT("Failed to get file system statistics") );
return FALSE;
}