process: allow changing `exitCode` in `on('exit')`