[systemd-devel] ERRNO parameter in NOTIFY_SOCKET (request for patch review)

Miguel Angel Ajo Pelayo mangelajo at redhat.com
Thu Jul 3 02:38:00 PDT 2014



  I was trying to make use of the ERRNO message in the NOTIFY_SOCKET
mechanism, to signal services that were running on degraded mode
but didn't exit.

I discovered that it wasn't implemented [1], so I wrote 
a patch [2]


Initially I exposed the code as "ExecMainCode" but that was 
overwritten at main exec exit, so I moved it into a new field.


  I'm concerned about a couple of things:

1) Does it make more sense to have this ERRNO code as a plain
"ERRNOCode" (inside Service class) instead of "ExecMainERRNO" ?

2) In both?


3) Upcase ERRNO is ok? or shall we go for ErrNo ? 


In the current implementation, a systemctl show would output:

[....]
MainPID=1176
ControlPID=0
StatusText=I'm running, with status 10
Result=success
ExecMainStartTimestamp=Thu 2014-07-03 10:52:26 CEST
ExecMainStartTimestampMonotonic=2109001767
ExecMainExitTimestampMonotonic=0
ExecMainPID=1176
ExecMainCode=0
ExecMainStatus=0
ExecMainERRNO=10



Best regards,
Miguel Ángel Ajo.


[1]  https://bugs.freedesktop.org/show_bug.cgi?id=80749
[2]  https://bugs.freedesktop.org/attachment.cgi?id=102188


More information about the systemd-devel mailing list