Hanging network drives
Moderators: Hacker, petermad, Stefan2, white
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...
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...
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
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.
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!
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
-
- Junior Member
- Posts: 8
- Joined: 2003-05-13, 22:32 UTC
Who is "we"? Users of SpeedCommander V10.0 on any version of Windows?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.
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.
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
2R.Nausedat
Thanks really for your answer! This may encourage Mr. Ghisler to implement it!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.
I switched to Linux, bye and thanks for all the fish!
- ghisler(Author)
- Site Admin
- Posts: 50505
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
- SanskritFritz
- Power Member
- Posts: 3693
- Joined: 2003-07-24, 09:25 UTC
- Location: Budapest, Hungary
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.
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!