You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
START_SCRIPT is started in a subshell by one-contexd service which will block and wait for this subshell (its process child) to terminate - therefore if start script creates any long running process then it will halt the one-contexd service and OS boot.
The issue manifests with obvious example like running infinite loop in the start script (while true ; do :; done) but unfortunately this happens also in more sinister way when a command seemingly is finished and start script reach the end - the culprit in these cases are processes which fork or daemonize.
Therefore very useful commands like rc-service nginx start cause this too and cannot be used in the start script currently.
I failed to find any trick to avoid this problem - no amount of nohups, setsid, disown and any of their combination seemed to work.
Proposed solution is to not run START_SCRIPT and possibly other scripts in a subshell.
The text was updated successfully, but these errors were encountered:
Scripts run by one-contexd will not be executed in a subshell - this
will fix the issue with the START_SCRIPT which would hold the boot if
any long-running process would originate in it (e.g. daemon/service).
User still will need to do something like this inside the START_SCRIPT
(or any other context script) otherwise SIGTERM will be sent:
nohup service nginx start &
Signed-off-by: Petr Ospalý <[email protected]>
Scripts run by one-contexd will not be executed in a subshell - this
will fix the issue with the START_SCRIPT which would hold the boot if
any long-running process would originate in it (e.g. daemon/service).
User still will need to do something like this inside the START_SCRIPT
(or any other context script) otherwise SIGTERM will be sent:
nohup service nginx start &
Signed-off-by: Petr Ospalý <[email protected]>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
START_SCRIPT
is started in a subshell byone-contexd
service which will block and wait for this subshell (its process child) to terminate - therefore if start script creates any long running process then it will halt the one-contexd service and OS boot.The issue manifests with obvious example like running infinite loop in the start script (
while true ; do :; done
) but unfortunately this happens also in more sinister way when a command seemingly is finished and start script reach the end - the culprit in these cases are processes which fork or daemonize.Therefore very useful commands like
rc-service nginx start
cause this too and cannot be used in the start script currently.I failed to find any trick to avoid this problem - no amount of nohups, setsid, disown and any of their combination seemed to work.
Proposed solution is to not run
START_SCRIPT
and possibly other scripts in a subshell.The text was updated successfully, but these errors were encountered: