fnproject/fdk-go

override exit codes

Closed this issue · 3 comments

Docker uses: http://tldp.org/LDP/abs/html/exitcodes.html
Make sure FDK does not allow functions to exit with these codes.
For example, 137 exit code is currently flagged as OOM in fn-agent, therefore functions should not be allowed to exit with 137 themselves.

what action should be taken when a user does attempt to exit with one of these codes? exit code 1 is extremely popular to exit with (per the linked table), what is the benefit of blocking this? this smells like adding to the surface area of the container contract (ie agent can expect certain behavior from container), need to flesh this out fully to decide on or we'll start leaking stuff like this.

We should definitely map out the details on this as conflicts such as OOM exit code is not acceptable. If FDK surface area has to grow to support this then it should.

closing this, as we think/agree this is outside of FDK scope at this time.