[Bug 1762911] Re: crontab -l return 1 in absence of /var/spool/cron/crontabs/user
Brian Murray
brian at ubuntu.com
Wed Apr 11 14:23:39 UTC 2018
** Project changed: apport => cron (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to cron in Ubuntu.
https://bugs.launchpad.net/bugs/1762911
Title:
crontab -l return 1 in absence of /var/spool/cron/crontabs/user
Status in cron package in Ubuntu:
New
Bug description:
i guess it is rather a feature than a bug
but it doesnot feel right
$ crontab -l
got "no crontab for $user" from stderr and a return code of 1
if the file /var/spool/cron/crontabs/$user does not exist
but if the file exists and is empty code 0 is returned
by default that file does not exist so i think the error code doesn't make sense
if "1" means error, the system should have that file created while creating user
if "1" means not found, 1 should be returned when no jobs are found in the file
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1762911/+subscriptions
More information about the foundations-bugs
mailing list