Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • The connection is coming from an INET socket while the process communicates via stdin and stdout. I thought there is some kind of systemd-managed proxy in between. So systemd has control over the socket. Commented Jun 6, 2019 at 8:01
  • @gerion No, there's no proxy. Stdin and stdout of the process forked by systemd are simply opened (using dup() syscall) to copies of the file descriptor of the socket that was just accepted. But once systemd forks the service process, it closes its own copy of that file descriptor. None if this is really new, inetd would do the same, fork a process to handle an accepted connection, mapping the socket to stdin+stdout of the forked process. systemd doesn't keep any reference to the connection socket. Commented Jun 6, 2019 at 11:32