On 5/11/06, Asim <asimkadav@xxxxxxxxx> wrote:
On 5/11/06, Asim <asimkadav@xxxxxxxxx> wrote: > On 5/11/06, Dang <linuxdang@xxxxxxxxx> wrote: > > On 5/11/06, Adrian - Razvan Deaconescu <razvand@xxxxxxxxx> wrote: > > > > > > > > > On 5/11/06, Dang <linuxdang@xxxxxxxxx> wrote: > > > > Hi, > > > > I have an requirement of logging program's name with time stamp on > > > > its exit. My preference would be to trap in kernel. Can't change > > > > source code, I have to achieve it using modules. > > > > > > You need to intercept the fork system call and not exit. > > You need to intercept the exec (execv) system call and not exit/fork. -- Asim Aerodynamically the bumblebee shouldn't be able to fly, but the bumblebee doesn't know that so it goes on flying anyway.
Hi Asim, thanks for the reply. Could you explain a bit how hooking execve() will help? -- Regards, Dang -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/