|
1009 | 1009 |
|
1010 | 1010 | <varlistentry> |
1011 | 1011 | <term><varname>NonBlocking=</varname></term> |
1012 | | - <listitem><para>Set the <constant>O_NONBLOCK</constant> flag for all file descriptors passed via socket-based |
1013 | | - activation. If true, all file descriptors >= 3 (i.e. all except stdin, stdout, stderr), excluding those passed |
1014 | | - in via the file descriptor storage logic (see <varname>FileDescriptorStoreMax=</varname> for details), will |
1015 | | - have the <constant>O_NONBLOCK</constant> flag set and hence are in non-blocking mode. This option is only |
| 1012 | + <listitem><para>Set the <constant>O_NONBLOCK</constant> flag for all file descriptors passed via |
| 1013 | + socket-based activation. If true, all file descriptors >= 3 (i.e. all except stdin, stdout, stderr), |
| 1014 | + excluding those passed in via the file descriptor storage logic (see |
| 1015 | + <varname>FileDescriptorStoreMax=</varname> for details), will have the |
| 1016 | + <constant>O_NONBLOCK</constant> flag set and hence are in non-blocking mode. This option is only |
1016 | 1017 | useful in conjunction with a socket unit, as described in |
1017 | | - <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry> and has no |
1018 | | - effect on file descriptors which were previously saved in the file-descriptor store for example. Defaults to |
1019 | | - false.</para></listitem> |
| 1018 | + <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry> |
| 1019 | + and has no effect on file descriptors which were previously saved in the file-descriptor store for |
| 1020 | + example. Defaults to false.</para> |
| 1021 | + |
| 1022 | + <para>Note that if the same socket unit is configured to be passed to multiple service units (via the |
| 1023 | + <varname>Sockets=</varname> setting, see below), and these services have different |
| 1024 | + <varname>NonBlocking=</varname> configurations, the precise state of <constant>O_NONBLOCK</constant> |
| 1025 | + depends on the order in which these services are invoked, and will possibly change after service code |
| 1026 | + already took possession of the socket file descriptor, simply because the |
| 1027 | + <constant>O_NONBLOCK</constant> state of a socket is shared by all file descriptors referencing |
| 1028 | + it. Hence it is essential that all services sharing the same socket use the same |
| 1029 | + <varname>NonBlocking=</varname> configuration, and do not change the flag in service code |
| 1030 | + either.</para></listitem> |
1020 | 1031 | </varlistentry> |
1021 | 1032 |
|
1022 | 1033 | <varlistentry> |
|
0 commit comments