Red Hat Bugzilla – Bug 174039
at doesnt record pid of jobs, and fails when directory removed or renamed
Last modified: 2007-11-30 17:11:17 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217
Description of problem:
At doesn't log the commencement of a job properly.
I propose an enhancement to at with the addition of a "-v" option which will record via syslog the child process id, user, and job number when an at job runs.
There is also a portion of at code which does a "waitpid" without collecting status and recording the exit status via syslog (there is one waitpid which does, however).
At fails to run a job for trivial reason (like the directory where the at command was typed from is renamed or disappears). That is really perverse because you never get back any information about what the job was (the job number is fairly useless).
Better to modify the "exit 1" in generated script with "cd || exit 1" so at least the job will try to run. Or perhaps make it an option to at (which users can alias).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Created attachment 121423 [details]
This patch adds -v option and allows directory to disappear
The "cd || exit 1" change should perhaps be controlled by command-line option.
The extra logging functionality you propose is made redundant by the at
audit log messages, which record the user, pid, and command being run
(via PAM and pam_loginuid) .
I will revisit the directory issue in the enhanced version of at I am working
on - I agree there should be an option to specify the directory in which the
command executes or that the command should be run if the cwd of the at
command no longer exists. But the old, well established default at behaviour,
of not running the command if the directory in which the at command is run no
longer exists should continue to be the default.
I add to devel version at-3.1.10 from upstream.
Upstream made -v option, which shows the time the job will be executed before
reading the job.
I'm working on different log file #200917. I'm planning to made it for devel,
maybe FC-6 update.