Subject: CVS domivogt: * Applied fixed restart patch.

From: CVS <[email-masked]>
Date: Sun, 30 May 1999 18:37:09 -0500 (CDT)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	domivogt	99/05/30 18:37:08

Modified files:
	.              : ChangeLog 
	fvwm           : fvwm.c 

Log message:
* Applied fixed restart patch.

--
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: Bob Woodside <[email-masked]>
Date: Mon, 31 May 1999 00:58:06 -0400

> * Applied fixed restart patch.

	It looks like it corrects the original problem, but I don't think the
bit that changes "fvwm" to "fvwm2" is the right thing to do. I believe
it was right the way it was.

	My production version of FVWM is always called simply "fvwm", not
"fvwm2". We've seen mail in the past indicating that a number of users
do this, and would just as soon see version-specific executable names
done away with.

	On the other hand, I see nothing to be gained from this change. It does
no real harm if the "-restart" arg gets passed to an earlier version of
FVWM (even version 1) - at worst, it'll squawk about it and come up
anyway.

- Bob

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 31 May 1999 20:17:43 +0300 (IDT)

> it was right the way it was.

I think neither "fvwm" nor "fvwm2" is correct here. As it is noted in TODO
section of the patch, the right thing is to cut a comparing string from
g_args[0]. So, if you have a fvwm binary named /usr/bin/abrakadabra
"Restart abrakadabra" must be processed as a native restart (with fvwm
arguments added) and other commands - as foreign restarts, even
"Restart fvwm2", since it is not the current running program.
Is this accessible to everyone? If so, I can implement this.

> FVWM (even version 1) - at worst, it'll squawk about it and come up

Getting an error message is unexpected to a user (there was not such
message with "Restart fvwm" in previous fvwm versions. But if enough 
people want to have "fvwm" string hard-coded, it would not probably be so
bad to add it as an additional comparing substring. Personally I am
against this - think about binary names /usr/bin/fvwm95 or
/usr/bin/scwm-based-on-fvwm. :)

Other things from restart TODO (fvwm.c, Done()):

* use dynamic allocation for my_args

On the second thought, the current static solution with 20 pointers, when
only first 16 fvwm arguments are kept, is good for 99.99% of all cases and
more fast than a dynamic solution. Does anyone think dynamic allocation
is still needed?

* divide the command to args by spaces/tabs

I would like to add this functionality, so, for example,
"Restart xterm -n console" will work.
I am not sure whether it is a good idea to accept arguments for a native
restart, like "Restart fvwm2 -f new". There are more problems with this
than advantages (must additional arguments be prepended or appended to
initial arguments?, sequential restarts will flood an argument list, etc.)
So additional arguments must be ignored for native restarts IMHO.

Regards,
Mikhael.

---

From: Bob Woodside <[email-masked]>
Date: Mon, 31 May 1999 18:26:48 -0400

Mikhael Goikhman wrote:
> "Restart abrakadabra" must be processed as a native restart 

	I have to agree with this.

> (with fvwm arguments added) and other commands - as foreign restarts,
> even "Restart fvwm2", since it is not the current running program.

	However, I have several versions of FVWM that I frequently restart;
they have different names, all starting with "fvwm".

	I don't think this invalidates your argument. I think instead that it
calls into question the technique of adding new arguments (like
"-restart") to the original ones. (We're sort of stuck with the "-s" one
for backward compatibility; and for backward compatibility, you really
do need to match "fvwm*" for this one.)

> > It does no real harm if the "-restart" arg gets passed to an earlier
> > version of FVWM (even version 1)...
> 
> message with "Restart fvwm" in previous fvwm versions.

	My thought here was that an unexpected error message from an older
version would be preferable to failing to restart a current version
properly.
But, as I said, I'm now questioning the whole idea of adding the
"-restart" arg.

> "Restart xterm -n console" will work.

	I absolutely agree. I think there was some discussion of this idea some
time back, and a consensus that it would be a good idea.

> restart, like "Restart fvwm2 -f new".

	Perhaps if arguments are accepted, they should replace the original
args, not be appended to them. Thus any program, even if its name
happens to match g_args[0], would be treaded as non-native; and the user
would be responsible for getting the args right.

- Bob