mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 13:32:23 +00:00
Shell: Fix incorrect fcntl usage
FD_CLOEXEC is a file descriptor flag, so one must use F_{G,S}ETFD instead.
This commit is contained in:
parent
fd80e7a339
commit
f248145e64
Notes:
sideshowbarker
2024-07-18 18:13:27 +09:00
Author: https://github.com/sin-ack
Commit: f248145e64
Pull-request: https://github.com/SerenityOS/serenity/pull/7075
Reviewed-by: https://github.com/alimpfard ✅
1 changed files with 2 additions and 2 deletions
|
@ -2118,8 +2118,8 @@ SavedFileDescriptors::SavedFileDescriptors(const NonnullRefPtrVector<AST::Rewiri
|
|||
continue;
|
||||
}
|
||||
|
||||
auto flags = fcntl(new_fd, F_GETFL);
|
||||
auto rc = fcntl(new_fd, F_SETFL, flags | FD_CLOEXEC);
|
||||
auto flags = fcntl(new_fd, F_GETFD);
|
||||
auto rc = fcntl(new_fd, F_SETFD, flags | FD_CLOEXEC);
|
||||
VERIFY(rc == 0);
|
||||
|
||||
m_saves.append({ rewiring.new_fd, new_fd });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue