bug-mcron
[Top][All Lists]
Advanced

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

Re: [Bug-mcron] Command does not run if not in PATH when mcron starts


From: Mathieu Lirzin
Subject: Re: [Bug-mcron] Command does not run if not in PATH when mcron starts
Date: Mon, 09 Apr 2018 00:01:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Pierre Neidhardt <address@hidden> writes:

> Now it makes sense I think: the PATH is incomplete in mcron's
> environment so it cannot possibly work.
>
> I guess it was my mistake then.
>
> Can mcron possibly catch this?

With the current specification which pass the string action to ‘system’
it seems not easily doable because we would have to parse shell syntax
like “FOO="BAR" echo $FOO; ls” and deduce the actual program(s) name(s)
before checking their availability with some sort of ‘which’ clone.  Not
being complete (for example only checking "echo") is not an issue IMO
but what should be avoided is false positive.

Alternatively we could provide a procedure which takes a list of strings
to be passed to ‘system*’ and where the first string is checked when
adding the job to the scheduler.

OTOH, Even if it doesn't provide the instant feedback, logging would
help to reliably detect this issue.

WDYT?

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37



reply via email to

[Prev in Thread] Current Thread [Next in Thread]