All, I wrote 2 small programms: 1 - daemonize itself in loop (forever) =) 2 - traces the fork/clone events via ptrace() interface. You can find both in attachment. The strange thing is that, when I'm trying to attach to new process (after I've detached from old one), ptrace() returns -1 and errno is EPERM. I examined kernel/ptrace.c source code and I suppose that I've found the reason for such behaviour. In file kernel/ptrace.c in function ptrace_attach(task) exists PT_PTRACED bit check: ... if (task->ptrace & PT_PTRACED) goto bad; ... bad: task_unlock(task); return retval; retval is set to -EPERM. I didn't find place where PT_PTRACED bit drops, please point me to this place if such exists. Or maybe I do something wrong? Thanks. PS: Please Cc reply to me, cause I'm not subscribed. -- Sergei "df" Kononov GnuPG ID: 0x7D992F45 Linux - because software problems should not cost money. (by Shlomi Fish)