-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
while (1) {
#ifdef WIN32
DWORD exitCode;
- BOOL res = GetExitCodeProcess(child, &exitCode);
+ GetExitCodeProcess(child, &exitCode);
if (exitCode != STILL_ACTIVE) {
UNDER_LOCK( cout << "Father sees his child is DONE: exit code = " << exitCode << endl );
break;
// On positionne les limites systeme imposees au fils
+ // This part is deactivated because those limits should be set on the job process, not on
+ // the ssh process. If it is done properly one day, beware of the types used (int is not enough)
+ /*
if (param.find(MAXCPUTIME) != param.end()) {
int maxcputime = param[MAXCPUTIME];
struct rlimit limit;
limit.rlim_max = int(maxramsize * 1.1) * 1024 * 1024;
setrlimit(RLIMIT_AS, &limit);
}
+ */
//char *const parmList[] = {"/usr/bin/ssh", "localhost", "-l", "aribes", "sleep 1 && echo end", NULL};
char * buffer = strdup(comstr.c_str());
// launch the new process
- BOOL res = CreateProcess(NULL, buffer, NULL, NULL, FALSE,
+ bool res = CreateProcess(NULL, buffer, NULL, NULL, FALSE,
CREATE_NO_WINDOW, chNewEnv, NULL, &si, &pi);
if (buffer) free(buffer);