linux - python fsync() on network drive hangs -


i write data file using following function:

def writeto1file(self, output_file, text):     output_file.write(text)     output_file.flush()     os.fsync(output_file.fileno()) 

the fsync() call mandatory handle ioerror: if don't use when network drive unreachable, function write() works on local buffer , raises no exceptions.

the problem after few write operations, function fsync() hangs. related to? local machine linux running python 2.7. drives mounted mount.cifs. remote disk on local server reachable. if unmount remote disk, fsync() returns after few tens of seconds.

you try setting nostrictsync mount option.

there information regarding @ https://www.kernel.org/doc/readme/documentation-filesystems-cifs-readme.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -

Save and close a word document by giving a name in R -