zClose(0) is correct, but must be called from the master process. Child processes can only close themselves.