2006-08-02 Thomas Schwinge <tschwinge@gnu.org>

* hurd/getdport.c (__detdport): Don't return EBADF; instead set
        errno to EBADF and return MACH_PORT_NULL.
This commit is contained in:
Roland McGrath 2006-08-03 01:18:36 +00:00
parent a71f6b1bd0
commit b4ef652a45
1 changed files with 5 additions and 2 deletions

View File

@ -35,8 +35,11 @@ __getdport (int fd)
so we don't bother allocating a real table. */
if (_hurd_init_dtable == NULL)
/* Never had a descriptor table. */
return EBADF;
{
/* Never had a descriptor table. */
errno = EBADF;
return MACH_PORT_NULL;
}
if (fd < 0 || (unsigned int) fd > _hurd_init_dtablesize ||
_hurd_init_dtable[fd] == MACH_PORT_NULL)