Re(2): REBOL/View for commercial products - renaming
[1/15] from: arolls::bigpond::net::au at: 13-Dec-2000 12:02
Under win2k, rebol/view and /core
I just tried
>> rename %rebol.exe %rebol2.exe
and it works!
This means you can easily overwrite the executable,
while it's running.
Can we do this on other platforms?
Anton.
[2/15] from: johnkenyon:ibm at: 13-Dec-2000 10:19
Hi,
>Can we do this on other platforms?
Works under RH Linux using core 2.4.39.4.1
Cheers,
John
[3/15] from: arolls:bigpond:au at: 14-Dec-2000 0:33
About renaming the rebol.exe while it is running:
> >Can we do this on other platforms?
> Works under RH Linux using core 2.4.39.4.1
So we can do it on win2k, linux - good so far.
Amiga?
Mac?
Win95/98/NT ? (probably yes).
Other unices (probably yes).
Anton.
[4/15] from: riachtchenko:docutec at: 13-Dec-2000 14:42
Halo Anton,
on nt 4.0 got,
>> change-dir %\D\Program_Files\rebol-0.31\view\ ;where i started it
from
== %/D/Program_Files/rebol-0.31/view/
>> rename %rebol.exe %rebol2.exe
** Access Error: Cannot rename rebol.exe.
** Where: rename %rebol.exe %rebol2.exe
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.exe rebol.r rebol2.exe rebx.exe user.r
>>
sascha
Anton wrote:
[5/15] from: jean:holzammer:faedv-n:bayern at: 13-Dec-2000 15:16
> About renaming the rebol.exe while it is running:
>
> >Can we do this on other platforms?
>
> So we can do it on win2k, linux - good so far.
> Amiga?
renaming, moving, deleting: no problem.
Jean
[6/15] from: arolls:bigpond:au at: 14-Dec-2000 1:27
What's this, Sascha? It renamed it anyway!
Is that a bug (or inconsistency) in rebol or NT ?
I think you should submit this interesting result to feedback.
So it looks like it works on NT,
we just need to catch any errors:
if error? try [rename %rebol.exe %rebol2.exe][]
:)
Anton.
[7/15] from: johnkenyon:ibm at: 13-Dec-2000 14:43
Hi,
>What's this, Sascha? It renamed it anyway!
The access error is because the file rebol2.exe already exists as shown by
the list-dir.
>> >> rename %rebol.exe %rebol2.exe
>> ** Access Error: Cannot rename rebol.exe.
>> ** Where: rename %rebol.exe %rebol2.exe
Just tested and NT works fine for renaming the rebol exe in the latest
view.
Cheers, John
[8/15] from: petr:krenzelok:trz:cz at: 13-Dec-2000 15:52
[johnkenyon--uk--ibm--com] wrote:
> Hi,
> >What's this, Sascha? It renamed it anyway!
<<quoted lines omitted: 5>>
> Just tested and NT works fine for renaming the rebol exe in the latest
> view.
Huh, but I can't rename it too and I am running definitely latest rebol/view
:-)
-pekr-
[9/15] from: jhagman:infa:abo:fi at: 13-Dec-2000 17:05
Quoting Anton ([arolls--bigpond--net--au]):
> Under win2k, rebol/view and /core
> I just tried
<<quoted lines omitted: 3>>
> while it's running.
> Can we do this on other platforms?
I did not test these, so there might be errors. Under Linux there
should be no problem, also Amiga behaves very well when moving a file
that is open. On Windows9x it won't work, as the system is very picky
about open files, you just can not do anything with those. It is a
problem ( or a design decision) with Windows not FAT as FAT under
Linux (I have some shared volumes) behaves like it should (in my
opinion)
Greetings,
Jussi
--
Jussi Hagman CS in Åbo Akademi University
Studentbyn 4 D 33 [juhagman--abo--fi]
20540 Åbo [jhagman--infa--abo--fi]
Finland
[10/15] from: johnkenyon:ibm at: 13-Dec-2000 15:12
Pekr,
How strange, I just tested it in core and view and both will allow the
rename. In detail I'm running Winnt with SP6a launching rebol from a cmd
window with an expicit path to the exe.
Cheers,
John
[11/15] from: riachtchenko:docutec at: 13-Dec-2000 16:10
No, John-
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.r rebx.exe user.r
>> owrite_err: disarm try [rename %rebx.exe %rebol.exe]
** Script Error: disarm expected error argument of type: error.
** Where: owrite_err: disarm try [rename %rebx.exe %rebol.exe]
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.exe rebol.r user.r
>> probe owrite_err
make object! [
code: 509
type: 'access
id: 'no-rename
arg1: "rebol.exe"
arg2: none
arg3: none
near: [rename %rebol.exe %rebol2.exe]
where: none
]
>>
i send it to feedback
cheers
sascha
[johnkenyon--uk--ibm--com] wrote:
[12/15] from: johnkenyon:ibm at: 13-Dec-2000 15:45
Hi,
Just to check, what fs are you using? My rebol partition is NTFS.
Cheers, John
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.r rebx.exe user.r
>> owrite_err: disarm try [rename %rebx.exe %rebol.exe]
** Script Error: disarm expected error argument of type: error.
** Where: owrite_err: disarm try [rename %rebx.exe %rebol.exe]
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.exe rebol.r user.r
>> probe owrite_err
make object! [
code: 509
[13/15] from: riachtchenko:docutec at: 13-Dec-2000 16:56
Hi,
so, also i have ntfs on D: NT4.0 sp4
it's succeccfull with overwrite
but no error-object returned as here:
>> owrite_err: error-object
>> probe owrite_err
make object! [
code: 0
type: none
id: none
arg1: none
arg2: none
arg3: none
near: none
where: none
]
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.r rebx.exe user.r
>> owrite_err: disarm try [rename %rebx.exe %rebol.exe]
** Script Error: disarm expected error argument of type: error.
** Where: owrite_err: disarm try [rename %rebx.exe %rebol.exe]
>> probe owrite_err
make object! [
code: 0
type: none
id: none
arg1: none
arg2: none
arg3: none
near: none
where: none
]
>> list-dir
babk_2 bak/ bak_2/ feedback.r nntp.r public/
rebol.exe rebol.r user.r
>>
forget probe owrite_err from my previous mail - i tampered with
those copy-paste a bit ;-)
sascha
[johnkenyon--uk--ibm--com] wrote:
[14/15] from: kracik:mbox:dkm:cz at: 13-Dec-2000 17:47
Hi,
renaming rebol.exe while running works for me in NT 4.
--
Michal Kracik
Petr Krenzelok wrote:
[15/15] from: arolls:bigpond:au at: 14-Dec-2000 16:27
Sascha,
You should only attempt to 'disarm the result of 'try
if it is an error!
err: try [code]
if error? err [
err: disarm err
probe err
]
If code is fine, then its result is returned, which
is not of type error!
If the code has a problem, then it returns a value
of type error!, *then* we disarm it.
Try disarming a non-error value such as 1.
>> disarm 1
** Script Error: disarm expected error argument of type: error.
** Where: disarm 1
Ooops. But 1 is a possible value that try might return.
(The final value of the code might be 1).
> so, also i have ntfs on D: NT4.0 sp4
> it's succeccfull with overwrite
<<quoted lines omitted: 5>>
> ** Script Error: disarm expected error argument of type: error.
> ** Where: owrite_err: disarm try [rename %rebx.exe %rebol.exe]
Ok, disarm failed because it didn't get an error.
That's because rename was successful.
So it should be:
>> owrite_err: try [rename %rebx.exe %rebol.exe]
>> if error? owrite_err [probe owrite_err: disarm owrite_err]
Anton.
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted