Provide proper exit code for signals

Currently ipmid only exits 0, allow it to exit based
on the signal captured.

Tested:

journalctl -u phosphor-pid-control -o json-pretty

{
        "_SYSTEMD_SLICE" : "-.slice",
        "_GID" : "0",
        "_CAP_EFFECTIVE" : "3fffffffff",
        "MESSAGE" : "phosphor-ipmi-host.service: Main process exited, code=killed, status=9/KILL",
        "EXIT_STATUS" : "9",
        "__CURSOR" : "s=cd10fcb9010e4cfdbcdad08709c2265d;i=399;b=2efcc2f735f74bc99588861556589a72;m=7c0ed53;t=592853b62b677;x=1ae3833ab435621e",
        "__MONOTONIC_TIMESTAMP" : "130084179",
        "MESSAGE_ID" : "98e322203f7a4ed290d09fe03c09fe15",
        "_EXE" : "/lib/systemd/systemd",
        "CODE_LINE" : "5797",
        "UNIT" : "phosphor-ipmi-host.service",
        "_SYSTEMD_CGROUP" : "/init.scope",
        "_SYSTEMD_UNIT" : "init.scope",
        "SYSLOG_IDENTIFIER" : "systemd",
        "_COMM" : "systemd",
        "_UID" : "0",
        "PRIORITY" : "4",
        "_HOSTNAME" : "intel-obmc",
        "SYSLOG_FACILITY" : "3",
        "CODE_FILE" : "src/core/unit.c",
        "CODE_FUNC" : "unit_log_process_exit",
        "_CMDLINE" : "/lib/systemd/systemd",
        "__REALTIME_TIMESTAMP" : "1568475808183927",
        "_SOURCE_REALTIME_TIMESTAMP" : "1568475808183827",
        "COMMAND" : "ExecStart",
        "INVOCATION_ID" : "67ff87a3ad4b4a4da3fe7e0ff083e2b8",
        "_TRANSPORT" : "journal",
        "_MACHINE_ID" : "f7182be05e2147feba2eaceaea0aded3",
        "_BOOT_ID" : "2efcc2f735f74bc99588861556589a72",
        "EXIT_CODE" : "killed",
        "_PID" : "1"
}

Change-Id: I9f3233546b43a331076d21b73beabbf2aaca9d8b
Signed-off-by: James Feist <james.feist@linux.intel.com>
1 file changed