zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Backgrounding part of 'ssh-agent $cmd'
Date: Fri, 18 Jan 2013 07:35:22 -0800	[thread overview]
Message-ID: <130118073522.ZM24670@torch.brasslantern.com> (raw)
In-Reply-To: <20130118141322.GE4666@lp-shahaf.local>

On Jan 18,  4:13pm, Daniel Shahaf wrote:
>
> The part that I find less than ideal so far is that, under load, the GUI
> ssh-askpass dialog appears after foo_main has started.

You could do it like this:

  ( # Subshell so caller's environment won't be changed; could instead
    # declare locals, but this is immune to changes in ssh-agent
    eval `ssh-agent`
    ssh-add ~/.ssh/foo.id_rsa
    {
      for h in host1 host2 host3; do 
        ssh -MNf $h &
      done
      wait
    } always {
      ssh-agent -k
    } &
  )

Then you don't have to background foo_ssh_preseed, and your preferred
order of events is retained.

> > Am I missing something?
> 
> 'ssh -MNf' daemonizes itself

Ah, of course.


  reply	other threads:[~2013-01-18 15:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  6:59 Daniel Shahaf
2013-01-16 17:35 ` Bart Schaefer
2013-01-18  6:18   ` Daniel Shahaf
2013-01-18  7:26     ` Bart Schaefer
2013-01-18 14:13       ` Daniel Shahaf
2013-01-18 15:35         ` Bart Schaefer [this message]
2013-01-21  3:58           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130118073522.ZM24670@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).