Movatterモバイル変換


[0]ホーム

URL:


locking files on freebsd

Haris LekatsasHaris_member at newsranger.com
Mon Apr 2 13:28:22 EDT 2001


Hello,I have a problem with locking files. The following code will work on several OSbut it seemsto fail on FreeBSD giving an IOError.Any ideas?f = open('filename', 'w')fd = f.fileno()flock = struct.pack('2h8l', FCNTL.F_WRLCK, 0, 0, 0, 0, 0, 0, 0, 0, 0)fcntl.fcntl(fd, FCNTL.F_SETLKW, flock)ThanksHaris Lekatsas


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp