in reply to Re: Re: Monitoring File Execution
in thread Monitoring File Execution

draper7,

What OS are you working in? If it is Linux, I would suggest that you follow andreychek suggestion and look into process accounting, as that would be a cleaner approach than writing your own script.

Nevertheless, the way I see a script like this working would look like this in psuedocode

get args from command line do some checking for validity of the arguments (ie, is it a valid process number, does the user own the process, ar +e the flags/signals valid) open log file write info about user, processid, process name, whatever close log file system("kill",$args,$processid)
More than that I can't do without spending a lot more time on it.

Scott