Mon Dec 28 12:22:05 CET 2015

ports and normal exits

Is there a way to trap the normal exit of a program, e.g. when running
a standard command line program?  Up to now I've used line mode with
an explicit "EOF" line produced by the command.

EDIT: link/1 is possible, but it looks like this doesn't capture
normal exit.