Set the controlling terminal for the new process.