3 ms·
User friendly until the user decides to invoke that command in a cron job and ends up with a headless process waiting for additional input.
by boomlinde 8y ago
User friendly until the user decides to invoke that command in a cron job and ends up with a headless process waiting for additional input.
- jessaustin 8y agoAnyone who doesn't test cron jobs before saving them deserves whatever she gets. There are scores of ways for cronjobs to fail. b^)
- boomlinde 8y agoWell, this is not a cronjob that failed, it's just waiting for input. Let's say that I did test the cronjob but that it starts "failing" after an update to the tool. My fault, I know, but at least I get mail when it fails while I won't if it's just waiting for input.
- dickeytk 8y agoThis scenario would only happen if a flag became required. Prompting or not it would still be an issue. (And it wouldn't prompt as this is a non-tty environment)
- boomlinde 8y ago> Prompting or not it would still be an issue. Yes, but in one case the issue would result in a mail because the cron job failed, and in the other case the issue would just cause the the process to hang indefinitely without notice
- dickeytk 8y agoNO IT WON'T HANG. I give up. I don't know how else to try to explain this to you.
- tomjakubowski 8y agoIt's possible to detect whether stdin or stdout is attached to a terminal, and do something different depending.