Bash: infinite sleep

Posted by watain on Stack Overflow See other posts from Stack Overflow or by watain
Published on 2010-05-29T13:12:14Z Indexed on 2010/05/29 13:22 UTC
Read the original article Hit count: 260

Filed under:
|
|
|
|

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

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?

Best regards

© Stack Overflow or respective owner

Related posts about linux

Related posts about bash