[Toybox] [PATCH] crond: Fix timing

Kana Steimle kanasteimle at gmail.com
Sun Jan 12 18:09:00 PST 2025


The changes are working fine for me so far. But after trying more
things with crond, I found a few more issues I wanted to fix, all
related to environment variables. Another patch is attached.
- When setting a variable in the crontab file, the value would have a
newline at the end of it. That's because getline() returns the line
with a newline at the end, and the code didn't strip that newline out.
- The HOME variable was being sourced from what HOME was set to when
crond was run, rather than what the user's home is in the passwd file.
I believe the intention was to set HOME to what it is in the passwd
file, but allow the crontab to override it.
- I decided to also set LOGNAME to the username of the crontab's
owner, since the posix manpage for crontab mentions that as one of the
variables that should be set.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: toybox-crond-fix_env.patch
Type: text/x-patch
Size: 1085 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20250113/9a75ead6/attachment.bin>


More information about the Toybox mailing list