Re: FVWM: `Exec exec foo' v. `Exec foo'

From: Dominik Vogt <fvwm_at_fvwm.org>
Date: Tue, 19 Nov 2002 11:08:27 +0100

On Mon, Nov 18, 2002 at 06:36:47PM -0600, Norvell Spearman wrote:
> On Mon, Nov 18, 2002 at 10:29:34AM +0100, Dominik Vogt wrote:
> > The man page exaggerates a bit. Without "exec", the xterm is
> > started as a separate process, whereas with "exec" it replaces the
> > *parent* shell:
> >
> > Without exec:
> >
> > bash
> > xterm
> > bash (client app)
> >
> > With exec:
> >
> > xterm (replaces original bash)
> > bash (client app)
>
> I added an entry to the menu so that I have ``XTerm'' and ``Other
> Xterm,'' with the former using `Exec xterm' and the latter using `Exec
> exec xterm.' When I open ``Xterm'' and ``Other XTerm'' from the menu
> and then do a ``ps -ax'' I get one xterm and one bash entry for both. I
> also noticed that my xterm is really a shell script calling xterm.real
> (the real binary), so I changed both menu entries to call xterm.real
> directly --- with the same results as above. My ps output shows
> something like this:
>
> 29836 ? S 0:00 xterm.real -sb <more options>
> 29837 pts/1 S 0:00 bash
>
> Since bash is listed after xterm.real, does this mean that bash is
> xterm's client (as in your second scenario above)?

In this case, probably yes. Try "pstree -p" to see which process
was spawned by whom.

> If so, why do using
> both ``Exec exec xterm'' and ``Exec xterm'' seem to produce the same
> results.

Good question. I can only guess that modern shells use "exec"
automatically when started with "<shell> -c <cmd>".

> I'm not trying to belabor the point; I just want to be sure I
> don't have unnecessary processes going on. Thanks very much.

Bye

Dominik ^_^ ^_^
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Nov 19 2002 - 05:08:27 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST