[
https://issues.apache.org/jira/browse/MESOS-1197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jie Yu reassigned MESOS-1197:
-----------------------------
Assignee: Jie Yu
> 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
> Assignee: 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)