bitsmanent / snore

sleep with feedback
MIT License
73 stars 11 forks source link

Support ‘snore inf’ #7

Closed paride closed 6 years ago

paride commented 6 years ago

sleep(1) supports the sleep inf syntax, which sleeps indefinitely. This should be supported by snore for two reasons:

In my opinion, snore without arguments should behave like snore inf, but I don't know if you are willing to change its behavior at this point.

Apparently, software is never "complete" :)

bitsmanent commented 6 years ago

Thanks for contributing!

I understand why you would like to make snore behaving this way but I cannot see any suitable use for it. I never let sleep go for more than one day or even for one hour. Maybe this kind of task fits better for a cronjob, even if you need to run once. Also, sleeping indefinitely make the code more complex and raises problems with high time values which, good or bad, has already been addressed.

Please notice that the inf argument is not "standard" but only supported by the GNU project, which is not famous for keeping things simple. A simpler (and nifty) version is this one, where of course there is no place for inf and snore is already a drop-in replacement for it.

Having said that, if anyone can provide a patch without adding too much complexity then I will not be against it but honestly I have some strong doubt on the feasibility.