Hanging network drives

English support forum

Moderators: white, Hacker, petermad, Stefan2

gigaman
Member
Member
Posts: 131
Joined: 2003-02-14, 11:28 UTC

Post by *gigaman »

A would say it could be dangerous... even if the only thing the thread would do it calling FindFirstFile().
Especially on Win9x, some system resources may be locked, and if interrupted, they would never get unlocked (i.e. the system would be "frozen").

I checked the win98 kernel... it seems that some (important?) parts of the function are enclosed in _EnterSysLevel/_LeaveSysLevel calls, which means (if I remember correctly) that the thread cannot be terminated inside (i.e. it would hopefully be safe, since the thread will first leave the section and then will be killed). However, then a call to INT21 follows... which is not protected this way. I have no idea if this could cause problems...
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

Well, even though I agree with gigaman, probably those functions are not thread safe, there we need again our very kind Sven, who could maybe tell us, if he or his users ever reported a problem with this. :roll: I wrote a little prog in Delphi6, and i got the same results as Christian. Windows really seems to serialize all file requests within one process. Now I will try to terminate the thread, but for other reasons, my prog froze doing this ;-)
I switched to Linux, bye and thanks for all the fish!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

it would hopefully be safe, since the thread will first leave the section and then will be killed
I also guess, that would mean, that we still have to wait for the timeout. :roll:
I switched to Linux, bye and thanks for all the fish!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

May this 'TerminateThread' could be implemented as an 'expert users' option for those who want to risk it?

sheepdog
R.Nausedat
Junior Member
Junior Member
Posts: 8
Joined: 2003-05-13, 22:32 UTC

Post by *R.Nausedat »

@SanskritFritz:

so far we hadn't had any issues regarding the termination of a "hanging" network connection. Also, this feature seems to be much appreciated, so I assume it used rather often.

R. Nausedat
jb
Senior Member
Senior Member
Posts: 412
Joined: 2003-02-09, 22:56 UTC
Location: Switzerland

Post by *jb »

R.Nausedat wrote:@SanskritFritz:

so far we hadn't had any issues regarding the termination of a "hanging" network connection. Also, this feature seems to be much appreciated, so I assume it used rather often.
Who is "we"? Users of SpeedCommander V10.0 on any version of Windows?

EDIT:
In the meantime I realized that you are the "R.Nausedat" that is mentioned in the About box of the Squeez Self Extractor. So "we" means the developers of SpeedCommander. But still there remains the question regarding the Windows versions.
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

May this 'TerminateThread' could be implemented as an 'expert users' option for those who want to risk it?
Yes, good idea!
I switched to Linux, bye and thanks for all the fish!
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2R.Nausedat
so far we hadn't had any issues regarding the termination of a "hanging" network connection. Also, this feature seems to be much appreciated, so I assume it used rather often.
Thanks really for your answer! This may encourage Mr. Ghisler to implement it!
I switched to Linux, bye and thanks for all the fish!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48097
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I'm still not convinced about the usefulness of it: "SanskritFritz" seems to confirm my observations that a hanging FindFirstFile call will hang other FindFirstFile calls in other threads even when, so I'm still surprised that it would work in SC. I still have my old code so I can easily reactivate it for testing purposes, though. Perhaps I will restrict it to NT-based operating systems.
Author of Total Commander
https://www.ghisler.com
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

2ghisler(Author)
Actually I just confirmed your problem, but i didnt come to try the TerminateThread version, because my program hung for other reasons. Unfortunately i dont have the means to explore further now, because im in a process of moving to another computer and Delphi is not yet installed.
I switched to Linux, bye and thanks for all the fish!
Post Reply