浏览代码

headless-browser: Ensure IPC::File is closed after sending

On systems with the default ulimit for open files <= 256 (default
on some systems) the LibWeb tests were crashing because the
input file handles are not closed in headless-browser.
Sebastian Zaha 2 年之前
父节点
当前提交
d77986f01c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Utilities/headless-browser.cpp

+ 1 - 1
Userland/Utilities/headless-browser.cpp

@@ -120,7 +120,7 @@ private:
         if (file.is_error())
             client().async_handle_file_return(file.error().code(), {}, request_id);
         else
-            client().async_handle_file_return(0, IPC::File(*file.value()), request_id);
+            client().async_handle_file_return(0, IPC::File(*file.value(), IPC::File::CloseAfterSending), request_id);
     }
 
     void notify_server_did_finish_handling_input_event(bool) override { }