equal
deleted
inserted
replaced
4257 |
4257 |
4258 // Run the specified command in a separate process. Return its exit value, |
4258 // Run the specified command in a separate process. Return its exit value, |
4259 // or -1 on failure (e.g. can't fork a new process). |
4259 // or -1 on failure (e.g. can't fork a new process). |
4260 // Unlike system(), this function can be called from signal handler. It |
4260 // Unlike system(), this function can be called from signal handler. It |
4261 // doesn't block SIGINT et al. |
4261 // doesn't block SIGINT et al. |
4262 int os::fork_and_exec(char* cmd) { |
4262 int os::fork_and_exec(char* cmd, bool use_vfork_if_available) { |
4263 char * argv[4] = {"sh", "-c", cmd, NULL}; |
4263 char * argv[4] = {"sh", "-c", cmd, NULL}; |
4264 |
4264 |
4265 pid_t pid = fork(); |
4265 pid_t pid = fork(); |
4266 |
4266 |
4267 if (pid < 0) { |
4267 if (pid < 0) { |