forkProcess: fix task mutex release order