击:无限睡眠(无限阻塞) [英] Bash: infinite sleep (infinite blocking)

查看:291
本文介绍了击:无限睡眠(无限阻塞)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用运行startx 来启动X将评估我的的.xinitrc 。在我的的.xinitrc 我开始使用我的窗口管理器的/ usr / bin中/ mywm 。现在,如果我杀了我的WM(以F.E.测试其他一些WM),X会因为的.xinitrc 脚本达到EOF终止了。
所以我说这在结束我的的.xinitrc

I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate too because the .xinitrc script reached EOF. So I added this at the end of my .xinitrc:

while true; do sleep 10000; done

如果我杀了我的WM这样X将不会终止。现在我的问题:我该怎么做一个无限睡眠而不是循环的睡眠?有没有这将有点像冻结脚本中的命令?

This way X won't terminate if I kill my WM. Now my question: how can I do an infinite sleep instead of looping sleep? Is there a command which will kinda like freeze the script?

最好的问候

推荐答案

睡眠无穷不正是它表明,没有虐猫的作品。

sleep infinity does exactly what it suggests and works without cat abuse.

这篇关于击:无限睡眠(无限阻塞)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆