On 5 June 2013 23:34, Christian Kastner <[email protected]> wrote:
> On 2013-06-05 13:12, Saint Germain wrote:
>>>> Indeed even if cron has nothing to do, a temporary file is
>>>> always created in /tmp and immediatly deleted.
>>
>> "nothing to do" = there is no job (cron.hourly is empty and users
>> cron are empty)
>>
>> However it would more elegant for cron to skip this file creation
>> in case there is no job to execute.
>
> Ah, but there is one job running: run-parts.
>
> The scripts in cron.{hourly,daily,weekly,monthly} are not processed by
> the cron daemon directly. Instead, the system crontab /etc/crontab
> contains schedules for calls to "run-parts /etc/cron.[interval]", and
> run-parts then processes those scripts. From cron's POV, there is
> always exactly 1 process being run.
>
> So another workaround for you would be to comment out the hourly
> stanza from /etc/crontab.
>
> Any other solution would be overly complex to implement, I'm afraid.

Ok I haven't carefully read the commit, so I didn't understand why
this file creation was necessary in the first place (and why other
distro don't have this behavior).
If mounting /tmp on a tmpfs as a workaround is acceptable, probably
that creating the temporary file directly in RAM would also be
acceptable ?
Anyway, as you are the maintainer, I think you are much knowledgeable
than me to decide what is best for Debian.

>> This is only a minor bug though, but I spent quite a long time
>> tracking it (especially given that only Debian users have this bug)
>> so I thought that it may be useful to report it.
>
> I agree, thank you.
>
>> I can of course mount /tmp on a tmpfs, but it seems to me that it
>> would be overkill (as cron is the only software I have which
>> behaves like this). A better workaround would be for me to simply
>> comment the line cron.hourly in /etc/crontab (as I don't have any
>> hourly job).
>
> (Off-topic, personal opinion: having a tmpfs on /tmp has many other
> benefits, eg: there is no need to clean the filesystem on boot. Most of
> the stuff in /tmp is probably going to be cached, ie in RAM, anyway)

Hum, that is a very hot question that was discussed many many times:
http://lwn.net/Articles/499534/

I think it is better to avoid discussing too much this particular hot
topic "/tmp on tmpfs". ;-)


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to