[CONC-651] Support systemd directive OpenFile= when connecting to a Unix socket Created: 2023-06-20 Updated: 2023-06-21 Resolved: 2023-06-21 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | API |
| Affects Version/s: | 3.3.5 |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Minor |
| Reporter: | Erik Sjölund | Assignee: | Georg Richter |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Fedora 38 |
||
| Description |
|
When connecting to a Unix socket, instead of providing a file path it would be nice The systemd directive OpenFile= was introduced in systemd 253 Man page: There is some example code at Here I replaced _ NULL_ with "/some/path"
Instead of specifying a path to the Unix socket there should be a way to specify the file descriptor name myfdname that was set in the systemd service unit
I don't know how to best introduce OpenFile= support in the API,
The file descriptor name is set by systemd in the environment variable LISTEN_FDNAMES (see https://www.freedesktop.org/software/systemd/man/sd_listen_fds.html). A side-note: OpenFile= also supports opening normal files. If MariaDB Connector/C has a need to open files, such files could be passed to MariaDB Connector/C as file descriptors with OpenFile= |
| Comments |
| Comment by Erik Sjölund [ 2023-06-21 ] |
|
This is a duplicate of CONC-652 and should be closed (or deleted). |
| Comment by Georg Richter [ 2023-06-21 ] |
|
Duplicate of CONC-652 |