/* Change a port cell to a directory in an open file descriptor.
- Copyright (C) 1999-2013 Free Software Foundation, Inc.
+ Copyright (C) 1999-2022 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <errno.h>
#include <unistd.h>
if (!d)
return __hurd_fail (EBADF);
+retry:
HURD_CRITICAL_BEGIN;
ret = HURD_PORT_USE (&d->port,
}));
HURD_CRITICAL_END;
+ if (ret == -1 && errno == EINTR)
+ /* Got a signal while inside an RPC of the critical section, retry again */
+ goto retry;
return ret;
}