Allows to execute a callback in a fork