QDir hangs on accessing CIFS remote folder when disconnected
问题 I'm using Qt 4.7 on CentOS 6.0. I have a remote share folder mounted with CIFS: mount -t cifs //PC128/mnt /media/net -o username=user,password=pwd,rw,noexec,soft,uid=user,gid=user When remote folder is somehow incorrectly disconnected (e.g. the network cable is pulled out) my application hangs because of QDir locks on attempt to touch the folder (e.g. QDir::exists call). After ~90 seconds it unlocks and returns false. It looks right - the timeout to 回答1: QDir uses synchronous file API. When