On Wed, Dec 18, 2013 at 01:16:24PM -0500, Carlos Torres wrote:
>
> On 12/18/13, Ivan Vershinin wrote:
> > But crontab file does not contain USER
> > environment variable by default,
>
> I might be missing something but doesn't crontab allow
> you to mention env variables in it, and it passes the
> I do not know how you guys think about this, but I would do that in one line:
>
> if(!(user = getenv("USER")))
I agree with you, although can be a discussion point if it is better or not
something like:
if ((user = getenv("USER)) != NULL)
--
Roberto E. Vargas Caballero
Hello,
On 12/18/13, Ivan Vershinin wrote:
> But crontab file does not contain USER
> environment variable by default,
I might be missing something but doesn't crontab allow
you to mention env variables in it, and it passes them
to its execv? all you'd have to do is
USER=ivan
--Carlos
Ivan Vershinin wrote:
> + user = getenv("USER");
> + if(!user)
Heyho,
I do not know how you guys think about this, but I would do that in one line:
if(!(user = getenv("USER")))
--Markus
Hello, people!
I use slock for quite a strange purpose from time to time :).
Namely, I run it using cron every 55 minutes, to get away from computer and
stretch my body a little bit. But crontab file does not contain USER
environment variable by default, so I'd spent a lot of time figuring out
why