在 GitLab 的 pre-receive
脚本环境中,使用 nohup
和 &
将命令放入后台执行可能会无效,因为 pre-receive
钩子脚本的执行上下文通常限制了它不能启动后台进程。GitLab 的 pre-receive
钩子在推送过程中被调用,并且其执行时间有限,因此 GitLab 不允许 pre-receive
钩子启动长时间运行的进程。
GitLab 钩子无法启动后台进程的问题
最新推荐文章于 2024-09-08 22:00:00 发布
在 GitLab 的 pre-receive
脚本环境中,使用 nohup
和 &
将命令放入后台执行可能会无效,因为 pre-receive
钩子脚本的执行上下文通常限制了它不能启动后台进程。GitLab 的 pre-receive
钩子在推送过程中被调用,并且其执行时间有限,因此 GitLab 不允许 pre-receive
钩子启动长时间运行的进程。