[
https://issues.apache.org/jira/browse/MESOS-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13962522#comment-13962522
]
Jie Yu edited comment on MESOS-1197 at 4/8/14 2:10 AM:
-------------------------------------------------------
For ::system, the calling process ignoring SIGINT and SIGQUIT, and blocking
SIGCHLD.
The os::system I propose in (1) do nothing about signals. It simply fork+exec
and then waitpid.
was (Author: jieyu):
For ::system, the calling process ignoring SIGINT and SIGQUIT, and blocking
SIGCHLD.
The os::system I propose in (1) do nothing about signals. It simply fork+exec
and then waitpid.
- Jie
> Adding signal safe os::system
> -----------------------------
>
> Key: MESOS-1197
> URL: https://issues.apache.org/jira/browse/MESOS-1197
> Project: Mesos
> Issue Type: Task
> Reporter: Jie Yu
>
> There exist a few scenarios in which we need to execute a shell command
> inside the child context (has to be signal safe). For example, in this review:
> https://reviews.apache.org/r/20026/
> However, the existing os::system is not async signal safe because ::system is
> not async signal safe. The main issue is because ::system has to deal with
> signal semantics:
> {noformat}
> The system() function hands the argument command to the command interpreter
> sh(1).
> The calling process waits for the shell to finish executing the command,
> ignoring SIGINT
> and SIGQUIT, and blocking SIGCHLD.
> {noformat}
> We have two options here:
> 1) make the existing os::system signal safe, but it's semantics will be
> slightly different from ::system
> 2) add a new function: os::safeSystem
> Let me know your thoughts!
--
This message was sent by Atlassian JIRA
(v6.2#6252)