TIP: Click on subject to list as thread! ANSI
echo: semware
to: All
from: Michael Graham
date: 2003-01-22 16:40:14
subject: [TSEPro] Re: WARNING: `OnlyOne` macro bug detected

From: Michael Graham 
@Date: Wed, 22 Jan 2003 01:10:14 -0500
@Sender: semware-owner{at}sawasdi.apana.org.au




> A small bug has cropped up in the "OnlyOne" macro in the
SemWare download
> area that ensures only one copy of TSEPro is running at a time. When the
> client copy of the program tries to pass a filename that has spaces in it
> to the server copy, the server tries to load each piece of the name as a
> separate file.

Actually, I don't think this is a bug in OnlyOne.  I find that as long
as you quote the file on the command line, the server loads the file
okay.

For instance, this doesn't work:

    g32 C:\WINDOWS\Temporary Internet Files\desktop.ini

But this does:

    g32 "C:\WINDOWS\Temporary Internet Files\desktop.ini"

I'm reasonably sure that this is the way it should be.  OnlyOne doesn't
parse the command line at all; it just passes it directly to EditFile().

Of course, I *could* make OnlyOne call QuotePath() before calling
EditFile(), but then you wouldn't be able to add switches and run
macros.

For instance, I run the following command line all the time to load
projects into my server instance of TSE:

    g32 /eloadproj some_project_file.proj

If OnlyOne were to quote that path, then TSE would try to find a file
named "/eloadproj some_project_file.proj" instead of running my
loadproj macro.

> using a shortcut with the following command line:
> "c:\TSEPro\g32.exe FNORDSIG.TXT /efnordsig". What happens if I click
> this shortcut when a server copy of the program is already running?

This should work fine, and do exactly what you expect.  It will cause
the server instance of TSE to load the file FNORDSIG.TXT, and run the
fnordsig macro.  OnlyOne won't parse the command line at all; it will
just run the equivalent of:

    EditFile("FNORDSIG.TXT /efnordsig")

Note that you can achieve exactly the same effect by typing this string
at an Editfile prompt in the server instance.

> Also, when the macro is first loaded it should set the FileLocking variable
> to NONE and *save the new configuation* since locked files seem to prevent
> proper process termination.

Hmmm...  that's interesting - I've never played around with file
locking in TSE.  I'll have to experiment.  Thanks for pointing this out.

> (I'm afraid to try, having had to kill two orphan processes already today. :))

What happened that made you have to kill processes?  Can you reproduce
it and tell me how you did it?  The only time I find that I have to kill
G32 processes is because my editing session has crashed for some other
reason.


Michael
P.S. the above assumes you are using the latest version of OnlyOne,
dated 06-16-02.


--
Michael Graham
magog{at}the-wire.com


--
TSEPro mailing list



---
[sawasdi.apana.org.au] (3:800/846.13)
* Origin: apana>>>>>fidonet
SEEN-BY: 633/267 270
@PATH: 800/846 1 640/954 774/605 123/500 106/1 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.