Commit 59890750 authored by jln@chromium.org's avatar jln@chromium.org

Revert 251265 "Setuid sandbox: exit(2) on SIGABRT"

> Setuid sandbox: exit(2) on SIGABRT
> 
> The setuid sandbox waits on its one child and then dies
> afterwards.
> 
> When receiving SIGABRT, instead of dumping core, simply exit the
> process. There is no interesting information to be gathered from
> knowing that the process is inside waitid(2), one should look at
> the child process instead.
> 
> This patch hopes to reduce red herrings.
> 
> BUG=334345
> NOTRY=true
> R=jorgelo@chromium.org
> 
> Review URL: https://codereview.chromium.org/165673002

TBR=jln@chromium.org

Review URL: https://codereview.chromium.org/164373005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251269 0039d316-1c4b-4281-b951-d872f2087c98
parent b0396cab
...@@ -58,12 +58,6 @@ static void FatalError(const char *msg, ...) { ...@@ -58,12 +58,6 @@ static void FatalError(const char *msg, ...) {
_exit(1); _exit(1);
} }
static void ExitWithErrorSignalHandler(int signal) {
const char msg[] = "\nThe setuid sandbox got signaled, exiting.\n";
write(2, msg, sizeof(msg) - 1);
_exit(1);
}
// We will chroot() to the helper's /proc/self directory. Anything there will // We will chroot() to the helper's /proc/self directory. Anything there will
// not exist anymore if we make sure to wait() for the helper. // not exist anymore if we make sure to wait() for the helper.
// //
...@@ -201,15 +195,6 @@ static void WaitForChildAndExit(pid_t child_pid) { ...@@ -201,15 +195,6 @@ static void WaitForChildAndExit(pid_t child_pid) {
int exit_code = -1; int exit_code = -1;
siginfo_t reaped_child_info; siginfo_t reaped_child_info;
// Don't "Core" on SIGABRT. SIGABRT is sent by the Chrome OS session manager
// when things are hanging.
// Here, the current process is going to waitid() and _exit(), so there is no
// point in generating a crash report. The child process is the one
// blocking us.
if (signal(SIGABRT, ExitWithErrorSignalHandler) == SIG_ERR) {
FatalError("Failed to change signal handler");
}
int wait_ret = int wait_ret =
HANDLE_EINTR(waitid(P_PID, child_pid, &reaped_child_info, WEXITED)); HANDLE_EINTR(waitid(P_PID, child_pid, &reaped_child_info, WEXITED));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment