src/hotspot/os/solaris/os_solaris.cpp
changeset 52109 101c2b6eacbe
parent 51376 181e6a03249b
child 52112 76c87b213fa0
equal deleted inserted replaced
52108:9c84227836d4 52109:101c2b6eacbe
  5250 
  5250 
  5251 // Run the specified command in a separate process. Return its exit value,
  5251 // Run the specified command in a separate process. Return its exit value,
  5252 // or -1 on failure (e.g. can't fork a new process).
  5252 // or -1 on failure (e.g. can't fork a new process).
  5253 // Unlike system(), this function can be called from signal handler. It
  5253 // Unlike system(), this function can be called from signal handler. It
  5254 // doesn't block SIGINT et al.
  5254 // doesn't block SIGINT et al.
  5255 int os::fork_and_exec(char* cmd) {
  5255 int os::fork_and_exec(char* cmd, bool use_vfork_if_available) {
  5256   char * argv[4];
  5256   char * argv[4];
  5257   argv[0] = (char *)"sh";
  5257   argv[0] = (char *)"sh";
  5258   argv[1] = (char *)"-c";
  5258   argv[1] = (char *)"-c";
  5259   argv[2] = cmd;
  5259   argv[2] = cmd;
  5260   argv[3] = NULL;
  5260   argv[3] = NULL;