Subject: Restart logic still broken

From: Peter Daum <[email-masked]>
Date: Mon, 21 Jun 1999 13:27:51 +0200 (MEST)

Hi,

I just tried the latest CVS sources to check, whether the Restart
command works again - no luck.

Let me summarize the 3 different cases and their intended
semantics (as i understand it):

- "Restart" (without any arguments): Re-execute the currently
  running WM with current  configuration (save window states to
  file, pass all command line args)

- "Restart --pass-args /path/to/wm": Same as above, except
  argv[0] is replaced with "/path/to/wm"

-- "Restart /path/to/wm --some -more -args": Execute something
   completely different

So much for the theory. As far as I understand the current
sources, this is not exactly what is intended right now:

For Restart without any args it is seemingly not intended to pass
the command line parameters. People who use CPP- or
M4-preprocessing (guess what - I am one of them ;-) will end up
with a totally unusable fvwm, because without the "-cmd FvwmM4
/path/to/configuration", fvwm will either not find a
configuration file at all or will choke on it because it contains
preprocessor makros.

In the second case, it looks like the desktop state is not saved
- it probably would be useful if it was, because passing the same
command line args only makes sense if the executed WM also is
some incarnation of fvwm, which also should understand the
".fvwm_restart" file (if it is an older version, the presence of
the file at least shoulnd't do any harm)

I couldn't find out why, but currently, the "--pass-args" doesn't
seem to work at all: the wm is allways invoked without any
arguments. The only way to restart fvwm with the appropriate
arguments, is to explicitly is to explicitly give them all to the
3rd variant of "Restart" (which is not particularly elegant and
doesn't preserve the desktop state).

Regards,
            Peter
-- 
                                             __o  
     Peter Daum <gator at cs.tu-berlin.de> _'\<_ 
       - pgp messages welcome -       ____(_)/(_)

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

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 21 Jun 1999 21:25:54 +0300 (IDT)

> command works again - no luck.

This is strange. I also use parameters for fvwm2.

> -- "Restart /path/to/wm --some -more-args": Execute something
>  completely different

Right, I am still not sure if the second one must be like the first or the
third.

> configuration file at all or will choke on it because it contains

Please check your configuration, is it really Restart without arguments
or is it "Restart fvwm2"? Everything works for me as described in the man
page.

> the file at least shoulnd't do any harm)

I will think about creating .fvwm_restart for all cases.
Actually, under a session manager the desktop state must already be
restored in all 3 cases (if wm supports this). But there are still some 
bugs.

> doesn't preserve the desktop state).

It always worked for me, and now even the last two work (all equivalent):
  Restart --pass-args fvwm2
  Restart --pass-args ~/bin/fvwm2
  Restart ~/bin/fvwm2 -f $HOME/.fvwm2rc++

Can you check this again?
If the parameters really get lost, can you please add this to main():
  vprintf("[FVWM ARGS]: %s %s %s\n", argv);

and check when exactly they get lost. Thank you.

Regards,
Mikhael.

---

From: Peter Daum <[email-masked]>
Date: Tue, 22 Jun 1999 10:34:41 +0200 (MEST)

Hi,

the more I am experimenting around, the less I know what is going
on: whatever makes my command line disappear obviously happens
nodeterministically from time to time, while at other times 10
times in a row everything works as it is supposed to. In those
cases when the arguments get lost, fvwm is really called without
args - the vprintf put at the beginning of main then says:

[FVWM ARGS]: /usr/local/X11/bin/fvwm2.3.4 (null) PWD=/

.. I'll let you know as soon as I know more

Regards,
           Peter

---

From: Brad Giaccio <[email-masked]>
Date: Thu, 24 Jun 1999 07:14:12 -0400

> and check when exactly they get lost. Thank you.

Mikhael,

I can now confirm all three of these work for me with todays CVS,
yesterday using --pass-args I kept getting the message can't exec
--pass-args fvwm2.  Upon inspection I couldn't see why, but this morning
I can't reproduce it, and the only change wass Dominik's fixes for
-Wall.  I let you know if I see any problems again.

Brad

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 26 Jun 1999 03:37:56 +0300 (IDT)

On Mon, 21 Jun 1999, Mikhael Goikhman wrote:

> > thefile at least shoulnd't do any harm)
> 

Done.

Regards,
Mikhael.