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

Re: ssh-add <defunct>: where's the reaper.

Bill Moseley wrote:
> I'm using this (subsection) in .xsession:
> $HOME/bin/root_window.pl &
> ssh-add  $HOME/.ssh/id_dsa $HOME/.ssh/id_dsa_pine < /dev/null &

Tsk, tsk!  You should have a passphrase on your key.  Contemplate this

  xterm -e ssh-add

> exec icewm-session
> But I'm left behind with the ssh-add zombie.

Zombies are processes of which the parent has not wait(2)'d on them to
transfer the return code.  Bad parent.  Kill the parent and the
zombies will be inherited by init and cleaned up.

> Also, if I kill "root_window.pl" that's left as a zombie, too.

Since both are ending up as zombies then you know it is the shell that
is in trouble.  The last command is the exec of icewm-session.  The
shell may or may not actually exec depending upon the shell and other

Try this instead.

  $HOME/bin/root_window.pl &
  ssh-add  $HOME/.ssh/id_dsa $HOME/.ssh/id_dsa_pine < /dev/null &
  icewm-session &

This should have almost the same effect.  The X session exits when the
xsession script exits.  So normally exiting the window manager logs
you out.  But if root_window.pl is still running the wait will keep
the script running longer than before.  You may need to kill
root_window.pl before the logout happens with this new configuration.

Alternately, if you don't care about security and don't have a
passphrase on your key then why put it in the background?  Just let it
run in the foreground.

  $HOME/bin/root_window.pl &
  ssh-add  $HOME/.ssh/id_dsa $HOME/.ssh/id_dsa_pine < /dev/null
  exec icewm-session

Personally I add those types of startup customizations to my window
manager init function instead.


Attachment: pgpyUWarSuJ6R.pgp
Description: PGP signature

Reply to: