Displaying 2 results from an estimated 2 matches for "npfd".
Did you mean:
epfd
2025 Apr 16
2
[PATCH] ssh-agent: exit 0 from SIGTERM under systemd socket-activation
...off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
ssh-agent.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ssh-agent.c b/ssh-agent.c
index 55b9f44f4..9617e6ee0 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -2238,6 +2238,7 @@ main(int ac, char **av)
size_t npfd = 0;
u_int maxfds;
sigset_t nsigset, osigset;
+ int socket_activated = 0;
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
@@ -2389,6 +2390,7 @@ main(int ac, char **av)
fatal("bad LISTEN_PID: %d vs pid %d", pid, getpid());
debug("u...
2023 Jun 17
2
[PATCH] ssh-agent: add systemd socket-based activation
...0, D_flag = 0, k_flag = 0, s_flag = 0;
- int sock, ch, result, saved_errno;
+ int sock = 0, ch, result, saved_errno;
char *shell, *format, *pidstr, *agentsocket = NULL;
#ifdef HAVE_SETRLIMIT
struct rlimit rlim;
@@ -2015,6 +2027,9 @@ main(int ac, char **av)
struct pollfd *pfd = NULL;
size_t npfd = 0;
u_int maxfds;
+#ifdef WITH_SYSTEMD
+ int nfds = 0;
+#endif
/* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
sanitise_stdfd();
@@ -2142,6 +2157,25 @@ main(int ac, char **av)
parent_pid = getpid();
+#ifdef WITH_SYSTEMD
+ nfds = sd_listen_fds(1);
+ if (nfds > 0)...