// On positionne les limites systeme imposees au fils
if (param.find(MAXCPUTIME) != param.end()) {
- UNDER_LOCK( cout << "AAAAAAAAAAAAAAAAAAaa" << endl );
int maxcputime = param[MAXCPUTIME];
struct rlimit limit;
limit.rlim_cur = maxcputime;
}
if (param.find(MAXDISKSIZE) != param.end()) {
- UNDER_LOCK( cout << "BBBBBBBBBBBBBBBBBBBbb" << endl );
int maxdisksize = param[MAXDISKSIZE];
struct rlimit limit;
limit.rlim_cur = maxdisksize * 1024;
}
if (param.find(MAXRAMSIZE) != param.end()) {
- UNDER_LOCK( cout << "CCCCCCCCCCCCCCCCCcc" << endl );
int maxramsize = param[MAXRAMSIZE];
struct rlimit limit;
limit.rlim_cur = maxramsize * 1024;
// On execute la commande du fils
- //int result = execve(argv[0], argv, envp);
- std::cerr << "EXECVE !!!!!!" << std::endl;
- execve(argv[0], argv, NULL);
+ int result = execve(argv[0], argv, envp);
UNDER_LOCK( cout << "*** debug_command = " << strerror(errno) << endl );
- //int result = execv(argv[0], argv);
- //
- //char *const parmList[] = {"/usr/bin/ssh", "localhost", "-l", "aribes", "sleep 10 && echo end", NULL};
- //int result = execv("/usr/bin/ssh", parmList);
-
// No need to deallocate since nothing happens after a successful exec
// Normalement on ne devrait jamais arriver ici