When fd does not refer to the controlling terminal of the calling process, -1 is returned, and errno is set appropriately. ###>When fd does not refer to the controlling terminal of the calling process, -1 is returned, and errno is set appropriately.