Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux OpenRC emacs守护程序崩溃,无法启动_Linux_Init - Fatal编程技术网

Linux OpenRC emacs守护程序崩溃,无法启动

Linux OpenRC emacs守护程序崩溃,无法启动,linux,init,Linux,Init,这是我为emacs守护程序编写的初始化脚本。我可以用ps aux | grep emacs看到这个过程,但它似乎不适用于openrc,它只是崩溃了,我在/var/log/rc.log中没有看到任何东西 #!/sbin/openrc-run command="emacs" command_args="--daemon" command_user="1000:1000" pidfile="/run/${RC_SVCNAME}.p

这是我为emacs守护程序编写的初始化脚本。我可以用ps aux | grep emacs看到这个过程,但它似乎不适用于openrc,它只是崩溃了,我在/var/log/rc.log中没有看到任何东西

#!/sbin/openrc-run

command="emacs"
command_args="--daemon"
command_user="1000:1000"
pidfile="/run/${RC_SVCNAME}.pid"

extra_started_commands="reload"

stop() {
        ebegin "Stoping Emacsd"
        /usr/bin/emacsclient -e '(kill-emacs)'
        eend $?
}

reload() {
        ebegin "Reloading $(RC_SVCNAME)"
        start-stop-daemon --signal HUP --pidfile "${pidfile}"
        eend $?
}

如果我使用
/etc/init.d/emacsd--debug start运行它

它打印出来了

Starting Emacs daemon.
+ eend 0 'Failed to start emacsd'                                              [ ok ]
+ service_set_value command emacs
+ '[' -n '' ']'
+ '[' -n /run/emacsd.pid ']'
+ service_set_value pidfile /run/emacsd.pid
+ '[' -n '' ']'
+ return 0
++ command -v start_post
+ '[' '' = start_post ']'
++ command -v cgroup_cleanup
+ '[' cgroup_cleanup = cgroup_cleanup ']'
+ '[' start = stop ']'
++ command -v cgroup2_remove
+ '[' cgroup2_remove = cgroup2_remove ']'
+ '[' start = stop ']'
+ '[' -z emacs ']'
+ shift
+ continue 2
+ '[' -n '' ']'
+ exit 0

 * status: crashed
如果我用
rc service emacsd status
检查状态,它会打印出来

Starting Emacs daemon.
+ eend 0 'Failed to start emacsd'                                              [ ok ]
+ service_set_value command emacs
+ '[' -n '' ']'
+ '[' -n /run/emacsd.pid ']'
+ service_set_value pidfile /run/emacsd.pid
+ '[' -n '' ']'
+ return 0
++ command -v start_post
+ '[' '' = start_post ']'
++ command -v cgroup_cleanup
+ '[' cgroup_cleanup = cgroup_cleanup ']'
+ '[' start = stop ']'
++ command -v cgroup2_remove
+ '[' cgroup2_remove = cgroup2_remove ']'
+ '[' start = stop ']'
+ '[' -z emacs ']'
+ shift
+ continue 2
+ '[' -n '' ']'
+ exit 0

 * status: crashed