crontab -l return 1 in absence of /var/spool/cron/crontabs/user

Bug #1762911 reported by He Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cron (Ubuntu)
New
Undecided
Unassigned

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

affects: apport → cron (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.