Rainer Koehler <[EMAIL PROTECTED]> writes:
> 
> The first time in months I can answer a question here, and Dan is
> quicker... ;-)

Sorry.

> Dan Espen writes:
> 
> > Tobias Werth <[EMAIL PROTECTED]> writes:
> >> Hi,
> >> 
> >> in my .fvwm2rc I have inserted an Init Function as follows:
> >> 
> >> AddToFunc InitFunction
> >> + I Exec exec ssh-add < /dev/null
> >> + I Exec exec $HOME/bin/email-notify
> >> 
> >> 
> >> Both programs grab for the keyboard with ssh-askpass and one of it fails.
> >> Can I give some option to the Init Function, so that the commands are
> >> processed sequentially?
> 
> > Exec exec sh -c 'ssh-add < /dev/null;$HOME/bin/email-notify'
> 
> Isn't it a bit overkill to let fvwm start a shell, just to exec sh?
> I have something similar to
> 
>   Exec ssh-add < /dev/null;$HOME/bin/email-notify

The double exec is to get rid of the shell that launches and
waits for the
the command to terminate.
Since email-notify probably hangs around, Exec exec is probably
better, but I'm not too sure that the shell I created with 'sh -c'
isn't hanging around.  Probably another exec in the command
will deal with it.

All in all, I like your suggested solution better.
I'll take simple over efficient every time.

> in my .fvwmrc and it works perfectly (with different commands, but
> still requiring execution in one shell).
> 
> By the way, I thought the double-exec was obsolete for years, but the
> manpage of my fvwm still mentions it.  So, what is the current status?

       Exec command
              ... You
              probably want to use an additional "exec" at
              the beginning of command.  Without that, the
              shell  that fvwm invokes to run your command
              stays until the command exits.   In  effect,
              you'll  have twice as many processes running
              as you need.   Note  that  some  shells  are
              smart  enough  to  avoid  this, but it never
              hurts to include the "exec" anyway.

-- 
Dan Espen                           E-mail: [EMAIL PROTECTED]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to