macOS: get peer PID in libstore daemon #640

Closed
opened 2025-01-22 20:06:51 +00:00 by jade · 1 comment
Owner

Affected code link: https://git.lix.systems/lix-project/lix/src/9cf91b7385e5b913126f0e2228d747b3d0953b1a/lix/nix/daemon.cc#L166-L196

We can just do this, nobody implemented it yet: https://chromium.googlesource.com/chromium/src/base/+/master/posix/unix_domain_socket.cc#198

This is quite useful for debuggability as it puts the peer PID into argv[1] like on Linux.

cc @lilyball

Affected code link: https://git.lix.systems/lix-project/lix/src/9cf91b7385e5b913126f0e2228d747b3d0953b1a/lix/nix/daemon.cc#L166-L196 We can just do this, nobody implemented it yet: https://chromium.googlesource.com/chromium/src/base/+/master/posix/unix_domain_socket.cc#198 This is quite useful for debuggability as it puts the peer PID into argv[1] like on Linux. cc @lilyball
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2453 ("daemon: get peer pid, gid for socket connection on darwin")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2453", "number": 2453, "kind": "commit message"}], "cl_meta": {"2453": {"change_title": "daemon: get peer pid, gid for socket connection on darwin"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2453](https://gerrit.lix.systems/c/lix/+/2453) ("daemon: get peer pid, gid for socket connection on darwin")
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#640
No description provided.