smbd: Separate aio_pthread indicator from normal EINTR
authorVolker Lendecke <vl@samba.org>
Thu, 20 Feb 2020 13:13:35 +0000 (14:13 +0100)
committerKarolin Seeger <kseeger@samba.org>
Tue, 25 Feb 2020 19:32:28 +0000 (19:32 +0000)
commita21688e7d4878fc3d5c80a87d12b1534acc34378
treece62fa21d8268fe1911ca3539c78c6f90af5f3ed
parent1a47b0fd1d31b3c519853e52a96ef810d0b980df
smbd: Separate aio_pthread indicator from normal EINTR

According to Posix and the Linux open(2) manpage, the open-syscall can
return EINTR. If that happens, core smbd saw this as an indication
that aio_pthread's open function was doing its job. With a real EINTR
without aio_pthread this meant we ended up in a server_exit after 20
seconds, because there was nobody to do the retry.

EINTR is mapped to NT_STATUS_RETRY. Handle this by just retrying after
a second.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=14285
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 20 22:14:25 UTC 2020 on sn-devel-184

(cherry picked from commit aebe427b77b5315eb5d2b05b8c72824ca0389723)
selftest/knownfail.d/open_eintr [deleted file]
source3/modules/vfs_aio_pthread.c
source3/smbd/open.c