Re: [exim-dev] Running a delivery process under a debugger

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jakob Hirsch
Datum:  
To: exim-dev
CC: Florian Weimer
Betreff: Re: [exim-dev] Running a delivery process under a debugger
Philip Hazel wrote:

>> 10180 pts/3    S+     0:00  |       \_ exim4 -M 1F3wi1-0002T4-5g
>> 10181 pts/3    S+     0:00  |           \_ exim4 -M 1F3wi1-0002T4-5g
> Yup. The main process runs as root; the delivery process runs as
> something else.


What if we are alread the exim user (and the executable is not setuid)?

> Surely there's some gdb option to attach to new processes?


Yes, "set follow-fork-mode child", but seems to work only on HP-UX and Linux.
The info pages suggest calling sleep() in the child code after the fork,
so there's time to attach gdb to the child process.