equal
deleted
inserted
replaced
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; |