fixed exit code setting to be called manually

- If called spawned process will end maybe before their callback is called