gabriel rosenkoetter on Thu, 4 Jan 2001 17:37:33 -0500


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

[PLUG] Re: spawning


On Thu, Jan 04, 2001 at 10:58:13PM +0100, MaD dUCK wrote:
> just how does spawning and process parenting work then? the reason i
> am asking is because everytime i log out of my x server, my ssh-agent
> session continues to live, so after a couple of days i have some 15
> ssh-agents running, and that's annoying... up to know i was expecting
> them to die when .xsession dies as a result of wmaker (it's last
> line) exiting... can this be enabled? how would one go about making
> sure that ssh-agent does not survive after it is not used anymore? a
> 'kill' after wmaker?

Reparenting is complicated and doesn't always work as you'd expect,
particularly with regard to xterms. I don't know all the details,
but this is largely dependant on whether or not the X server can
find the parent's parent (to whom process parenthood *should* get
passed under BSD--as opposed to Sys V, not as opposed to Linux--
process semantics, I believe, before it gets passed to init). Why
processes some times end up being parented under init (but still
owned by the user that started them) has always baffled me.

With regard to your specific problem, though, Martin, it sounds like
you are *not* using ssh-agent as the man page suggests. You need to
start either X, xdm, or your window manager as a child of
ssh-agent, and all the X sessions you want to see the agent's
sockets as children of one of those.

Yes, it works to do eval `ssh-agent` in .xsession (which I gather
you're doing), but that leads to lingering processes (as you
noticed).

The entirety of my .xsession:

/usr/pkg/bin/ssh-agent /usr/X11R6/bin/vtwm

... and I never have the problem you describe.

(Granted, the fact that vtwm's config file allows a VTWM_Profile
section allowing me to put what used to be in my .xsession there is
handy, but...)

       ~ g r @ eclipsed.net


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug