[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 02/10: shepherd: Open listening socket as SOCK_NONBLOCK.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 02/10: shepherd: Open listening socket as SOCK_NONBLOCK. |
Date: |
Wed, 7 Sep 2022 17:19:10 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit f8e0769a358c6489c3c87a7311aa31900ac5c22e
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 7 09:09:04 2022 +0200
shepherd: Open listening socket as SOCK_NONBLOCK.
* modules/shepherd.scm (open-server-socket): Pass SOCK_NONBLOCK to
'socket'. Remove 'fcntl' call.
---
modules/shepherd.scm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/modules/shepherd.scm b/modules/shepherd.scm
index 860fd30..a6a9246 100644
--- a/modules/shepherd.scm
+++ b/modules/shepherd.scm
@@ -45,11 +45,9 @@
"Open a socket at FILE-NAME, and listen for connections there."
(with-fluids ((%default-port-encoding "UTF-8"))
(let ((sock (socket PF_UNIX
- (logior SOCK_STREAM SOCK_CLOEXEC)
+ (logior SOCK_STREAM SOCK_NONBLOCK SOCK_CLOEXEC)
0))
(address (make-socket-address AF_UNIX file-name)))
- (fcntl sock F_SETFL (logior O_NONBLOCK
- (fcntl sock F_GETFL)))
(bind sock address)
(listen sock 10)
sock)))
- [shepherd] branch master updated (5c3a618 -> 978e5b4), Ludovic Courtès, 2022/09/07
- [shepherd] 04/10: shepherd: Mark client connection sockets as SOCK_NONBLOCK., Ludovic Courtès, 2022/09/07
- [shepherd] 07/10: service: Mark systemd listening sockets as SOCK_CLOEXEC., Ludovic Courtès, 2022/09/07
- [shepherd] 01/10: doc: Update inetd service example., Ludovic Courtès, 2022/09/07
- [shepherd] 09/10: shepherd: Upon startup, mark preexisting file descriptors as FD_CLOEXEC., Ludovic Courtès, 2022/09/07
- [shepherd] 10/10: shepherd: Add test ensuring proper use of close-on-exec., Ludovic Courtès, 2022/09/07
- [shepherd] 02/10: shepherd: Open listening socket as SOCK_NONBLOCK.,
Ludovic Courtès <=
- [shepherd] 03/10: shepherd: Mark client connection sockets as SOCK_CLOEXEC., Ludovic Courtès, 2022/09/07
- [shepherd] 05/10: system: Add 'pipe2' bindings., Ludovic Courtès, 2022/09/07
- [shepherd] 06/10: service: Mark service logging pipe as O_CLOEXEC., Ludovic Courtès, 2022/09/07
- [shepherd] 08/10: service: Mark inetd connection sockets as SOCK_CLOEXEC., Ludovic Courtès, 2022/09/07