From fb58e46672c65b49bfeeda0e7c9814414ae364ef Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Wed, 20 Dec 2023 17:11:17 +0100 Subject: [PATCH] lighttpd: omit O_NONBLOCK Uploading large files via HTTP PUT failed when the file system was accessed via a file system session because lighttpd opened the destination file with O_NONBLOCK and the write operation stalled at some point. genodelabs/genode#5093 --- repos/ports/ports/lighttpd.hash | 2 +- repos/ports/src/app/lighttpd/fd_cloexec.patch | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/repos/ports/ports/lighttpd.hash b/repos/ports/ports/lighttpd.hash index a1d1f50631..0c37bc3d5b 100644 --- a/repos/ports/ports/lighttpd.hash +++ b/repos/ports/ports/lighttpd.hash @@ -1 +1 @@ -6a9326a07968a5e7f637ec0720e7b4616e66149e +a2d881f54b350c44f5a252bfb4feae666a02c5c5 diff --git a/repos/ports/src/app/lighttpd/fd_cloexec.patch b/repos/ports/src/app/lighttpd/fd_cloexec.patch index 0fc4cbfda5..acaef7cf42 100644 --- a/repos/ports/src/app/lighttpd/fd_cloexec.patch +++ b/repos/ports/src/app/lighttpd/fd_cloexec.patch @@ -45,6 +45,15 @@ return fcntl(fd, F_DUPFD_CLOEXEC, 3); #else const int newfd = fcntl(fd, F_DUPFD, 3); +@@ -203,7 +203,7 @@ + /* O_CLOEXEC handled further below, if defined) */ + #ifdef O_NONBLOCK + #define FDEVENT_O_FLAGS \ +- (O_BINARY | O_LARGEFILE | O_NOCTTY | O_NONBLOCK) ++ (O_BINARY | O_LARGEFILE | O_NOCTTY ) + #else + #define FDEVENT_O_FLAGS \ + (O_BINARY | O_LARGEFILE | O_NOCTTY ) @@ -214,7 +214,7 @@ return open(pathname, flags | O_CLOEXEC | FDEVENT_O_FLAGS, mode); #else