// launch a new hydra_nameserver
std::string command;
command = "hydra_nameserver &";
- int status=system(command.c_str());
- if(status!=0)
- throw SALOME_Exception("Error when launching hydra_nameserver");
+ system(command.c_str());
// get the pid of all hydra_nameserver
std::set<pid_t> thepids2 = getpidofprogram("hydra_nameserver");
// my hydra_nameserver is the new one
for(it=thepids2.begin();it!=thepids2.end();it++)
if(thepids1.find(*it) == thepids1.end())
_pid_mpiServer = *it;
- if(_pid_mpiServer < 0)
- throw SALOME_Exception("Error when getting hydra_nameserver id");
#endif
#endif
}
#elif defined(WITHMPICH)
// kill my hydra_nameserver
- if( kill(_pid_mpiServer,SIGTERM) != 0 )
- throw SALOME_Exception("Error when killing hydra_nameserver");
+ if(_pid_mpiServer > -1)
+ if( kill(_pid_mpiServer,SIGTERM) != 0 )
+ throw SALOME_Exception("Error when killing hydra_nameserver");
#endif
#endif
}