core/socket: introduce intermediate SOCKET_START_OPEN state
Prior to this commit, if no Exec*= is defined for socket, and the unit was in SOCKET_FAILED state, failure of socket_open_fds() would induce state transition SOCKET_FAILED -> SOCKET_FAILED, and OnFailure= deps get unexpectedly skipped. Let's introduce an intermediate state, so that during unit start we enter UNIT_ACTIVATING at least once. Fixes #35635
This commit is contained in:
@@ -251,6 +251,7 @@ DEFINE_STRING_TABLE_LOOKUP(slice_state, SliceState);
|
||||
static const char* const socket_state_table[_SOCKET_STATE_MAX] = {
|
||||
[SOCKET_DEAD] = "dead",
|
||||
[SOCKET_START_PRE] = "start-pre",
|
||||
[SOCKET_START_OPEN] = "start-open",
|
||||
[SOCKET_START_CHOWN] = "start-chown",
|
||||
[SOCKET_START_POST] = "start-post",
|
||||
[SOCKET_LISTENING] = "listening",
|
||||
|
||||
@@ -168,6 +168,7 @@ typedef enum SliceState {
|
||||
typedef enum SocketState {
|
||||
SOCKET_DEAD,
|
||||
SOCKET_START_PRE,
|
||||
SOCKET_START_OPEN,
|
||||
SOCKET_START_CHOWN,
|
||||
SOCKET_START_POST,
|
||||
SOCKET_LISTENING,
|
||||
|
||||
Reference in New Issue
Block a user