timeout implementation for a slave process