You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Neil Conway (JIRA)" <ji...@apache.org> on 2015/12/17 06:37:46 UTC

[jira] [Updated] (MESOS-2209) Mesos should not use negative exit codes

     [ https://issues.apache.org/jira/browse/MESOS-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Conway updated MESOS-2209:
-------------------------------
    Fix Version/s: 0.27.0

> 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
>             Fix For: 0.27.0
>
>
> 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}
> The code needs to be audited to always return valid exit codes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)