* Gabriele Stilli [Fri, 22 Jun 2007 18:42:01 +0200]: > venerdì 22 giugno 2007, alle 18:04, Josselin Mouette scrive:
> > debreaper only starts the mailer with a pre-filled report. If anything > > is going wrong, this is your mailer for sending a mail without even > > asking! What mailer are you using? > I use Mutt, and this is the mailer debreaper fires up, too. > I did not configure the DEBREAPER_MAILER variable, though. Is it relevant > for this issue? > Anyhow, this behaviour happens only with amule, as I said; with other > programs (eboard, audacious) Mutt behaves nicely :-) What can be so > different from the other programs? Hi guys. As an interested party (amule maintainer), I spent some time debugging this issue. The reason this only happens with amule is: * aMule sets its stdin to $HOME/.aMule/logfile, but when run from a terminal, its stderr is the tty it was invoked from * debreaper's has_tty checks whether fd #2 is a tty, and if this is the case, it does not wrap the mailer in an x-terminal-emulator * mutt gets called, but stdin is not a tty, so it can't prompt for confirmation about sending, thus the message gets sent inconditionally To reproduce (/usr/bin/mutt must be present): % { unset GNOME_DESKTOP_SESSION_ID; unset KDE_FULL_SESSION; LD_PRELOAD=/usr/lib/debreaper/libviaticum.so amule & }; sleep 2; pkill -SEGV amule I recommend the following patch to be applied: --- utils.py.orig +++ utils.py @@ -19,7 +19,7 @@ return os.environ.has_key ("DISPLAY") def has_tty (): - return os.isatty(2) + return os.isatty(0) def is_hacker (): return os.environ.has_key ('DEBREAPER_HACKER') or \ With that change applied, a second problem pops up: madmutt is inconditionally selected, even if it's not present. This has a trivial patch as well, in configured_client(): --- utils.py.orig +++ utils.py @@ -68,7 +68,7 @@ if has_tty (): return [res] if has_x11 (): - return ["x-terminal-emulator", "-e", client] + return ["x-terminal-emulator", "-e", res] return None def launch_email_client (package, signum, report): HTH, -- Adeodato Simó dato at net.com.org.es Debian Developer adeodato at debian.org A hacker does for love what other would not do for money.