Re: [PATCH] maintenance: specify explicit stdin for crontab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/30/2021 1:12 PM, Kevin Daudt wrote:
> On Tue, Mar 30, 2021 at 08:02:22AM -0400, Derrick Stolee wrote:
>> On 3/30/2021 1:41 AM, Martin Ågren wrote:
>>> On Mon, 29 Mar 2021 at 23:23, Kevin Daudt <me@xxxxxxxxx> wrote:
>>>>
>>>> There are multiple crontab implementations that require stdin for
>>>> editing a crontab to be explicitly specified as '-'.
>>
>> Thank you for reporting this, especially with a patch!
>>
>> However, I'm not sure about this adding of '-' being something that
>> crontab ignores so commonly. My Ubuntu machine reports this:
>>
>> $ crontab -e -
>> crontab: usage error: no arguments permitted after this option
>> usage:  crontab [-u user] file
>>         crontab [ -u user ] [ -i ] { -e | -l | -r }
>>                 (default operation is replace, per 1003.2)
>>         -e      (edit user's crontab)
>>         -l      (list user's crontab)
>>         -r      (delete user's crontab)
>>         -i      (prompt before deleting user's crontab)
>>
>> Is there a way we could attempt writing over stdin, notice the
>> failure, then retry with the '-' option?
> 
> We do not use -e to edit, we run `crontab` and provide the contents to
> stdin. `crontab -e` just opens the crontab in the users editor, which
> would work with busybox as well, but that's not what's being done here.

Thank you. Of course. Muscle memory from testing crontab manually.

Thanks,
-Stolee




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux