watain watain - 1 year ago 162
Linux Question

Bash: infinite sleep (infinite blocking)

I use

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

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

Answer Source

Maybe this seems ugly, but why not just run cat and let it wait for input forever?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download