Bug 174039 - at doesnt record pid of jobs, and fails when directory removed or renamed
at doesnt record pid of jobs, and fails when directory removed or renamed
Product: Fedora
Classification: Fedora
Component: at (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2005-11-23 18:53 EST by JW
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-01 09:01:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
This patch adds -v option and allows directory to disappear (4.21 KB, patch)
2005-11-23 18:57 EST, JW
no flags Details | Diff

  None (edit)
Description JW 2005-11-23 18:53:40 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):

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 JW 2005-11-23 18:57:25 EST
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.
Comment 2 Jason Vas Dias 2005-11-30 12:58:53 EST
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.
Comment 3 Marcela Mašláňová 2006-11-01 09:01:30 EST
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. 

Note You need to log in before you can comment on or make changes to this bug.