You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Steven Schlansker (JIRA)" <ji...@apache.org> on 2015/01/08 19:23:34 UTC
[jira] [Created] (MESOS-2209) Mesos should not use negative exit
codes
Steven Schlansker created MESOS-2209:
----------------------------------------
Summary: Mesos should not use negative exit codes
Key: MESOS-2209
URL: https://issues.apache.org/jira/browse/MESOS-2209
Project: Mesos
Issue Type: Bug
Components: slave
Affects Versions: 0.21.0
Reporter: Steven Schlansker
Priority: Minor
POSIX restricts exit codes to an unsigned 8 bit integer.
Mesos has a number of places where it exits with status -1. outside that range. With some shells (notably dash, which is /bin/sh on Debian based systems) this causes an error:
{code}
/bin/sh: 1: exit: Illegal number: -1
{code}
An example of where this is done is in exec.cpp
{code}
void kill()
{
VLOG(1) << "Committing suicide by killing the process group";
// TODO(vinod): Invoke killtree without killing ourselves.
// Kill the process group (including ourself).
killpg(0, SIGKILL);
// The signal might not get delivered immediately, so sleep for a
// few seconds. Worst case scenario, exit abnormally.
os::sleep(Seconds(5));
exit(-1);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)