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

fix #7081