tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.0.35); XEmacs doesn't kill subprocess using su


From: Kai Großjohann
Subject: Re: tramp (2.0.35); XEmacs doesn't kill subprocess using su
Date: Mon, 21 Jul 2003 09:10:09 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Alexander Taler <address@hidden> writes:

> Using the su method, XEmacs can't kill the shell subprocess, which
> prevents it from exiting.

Whee.  Hm.  Why is it trying to kill the shell, rather than the su
process?  (Does it work to kill the su process from outside of
XEmacs?  Does it work to kill the shell spawned by su from outside of
XEmacs?  Both as luser, not as root, of course.)

> To reproduce:
>
>    xemacs --no-init-file --no-site-file
>
>    C-x C-f   /[su/address@hidden/etc/passwd
>
>    C-x C-c
>
> The XEmacs window disappears, but the process is still around,
> although it thinks it has crashed.

Really.  I didn't believe it, but it's happening.  Hm.

> Clearly the problem is that the subprocess belongs to root, and not to
> me, so the normal XEmacs signalling can't deal with it.

IMVHO, XEmacs should be able to kill the su process.

> I guess that the way to deal with this would be to somehow hook into
> the killing of the buffer (unless this exists, and it's just not
> working for me).  I am happy to help test any solutions to this
> problem.

I could add something to kill-emacs-hook that sends "exit" to all
shells invoked by Tramp.  But I'm surprised that this should be
necessary.

It turns out that I can reproduce this problem in XEmacs by doing the
following:

* xemacs -vanilla

* In the *scratch* buffer, evaluate
  (start-process "killtest" (get-buffer-create "killtest")
                 "/bin/su" "-")

* Switch to the killtest buffer and type

    M-: (process-send-string nil "therootpasswordgoeshere\n") RET

* Now exit XEmacs with C-x C-c.  It asks whether to kill the
  subprocess, but answering yes still leads to an XEmacs process
  hanging around.

Since I presume that it works when starting another process instead
of su, I am inclined to say it's a bug in XEmacs.  But I will
investigate further later on, right now I'm in the train and can't
concentrate very well.
-- 
~/.signature




reply via email to

[Prev in Thread] Current Thread [Next in Thread]