Closed hongkongkiwi closed 2 years ago
Yes, that's a current limitation, unfortunately. We had an implementation in Finit before, which caused other problems, so the restart (stop + start) functionality was moved to initctl. I don't think anyone expected restart on oneself as a use-case.
I'll see what we can come up with, likely fold it into the state machine redesign already planned.
There, should work better now. Also added a regression test for it so we don't stumble upon this again.
So I have an app which calls initctl restart to restart itself. Well actually I’m calling restart on the whole group, there’s many different apps in the names group.
But I’ve found that when the app dies it kills the child process of initctl.
The app only stops but doesn’t restart again. My theory is that initctl dies after sending the stop command and never gets to sending the start command.
I sort of expect that a restart command once sent is left Upto finit to handle so even if initctl is killed it should complete the restarting.
I’ve got a workaround for now but I wanted to report it as an issue.