Mail Archives: cygwin-developers/2001/02/28/07:42:47
It seems that a write lock on a file hold by a process
inhibits read access from the same process:
This piece of code in my editor (ved)
struct flock fl;
int ret;
fl.l_whence = 0;
fl.l_start = 0;
fl.l_len = 0;
fl.l_type = 0;
fl.l_type |= F_WRLCK;
ret = fcntl(f, F_SETLK, &fl);
return (ret);
Causes the problem:
305 533760 [main] ved 1966225 _open: 4 = open (limit.c, 0x2)^M
457 534217 [main] ved 1966225 _fcntl: 0 = fcntl (4, 8, 0x255DC0C)^M
352 534569 [main] ved 1966225 _open: open (limit.c, 0x10000)^M
327 534896 [main] ved 1966225 dtable::build_fhandler: some disk file - cb 56, fd 5, fh 0x14590B28^M
1081 535977 [main] ved 1966225 fhandler_disk_file::open: (limit.c, 0x10000)^M
497 536474 [main] ved 1966225 mount_info::conv_to_win32_path: conv_to_win32_path (limit.c)^M
302 536776 [main] ved 1966225 normalize_posix_path: src limit.c^M
looks OK, but later...
378 543169 [main] ved 1966225 _open: 5 = open (limit.c, 0x10000)^M
335 543504 [main] ved 1966225 fhandler_base::fcntl: GETFL: 65536^M
279 543783 [main] ved 1966225 _fcntl: 65536 = fcntl (5, 3, 0x0)^M
282 544065 [main] ved 1966225 _cygwin_istext_for_stdio: _cygwin_istext_for_stdio (5)^M
266 544331 [main] ved 1966225 _cygwin_istext_for_stdio: _cifs: get_*_binary^M
271 544602 [main] ved 1966225 setmode_helper: setmode: file was raw now raw^M
259 544861 [main] ved 1966225 setmode: setmode (5, binary) returns binary^M
315 545176 [main] ved 1966225 _cygwin_istext_for_stdio: _cygwin_istext_for_stdio (5)^M
269 545445 [main] ved 1966225 _cygwin_istext_for_stdio: _cifs: get_*_binary^M
330 545775 [main] ved 1966225 _read: read (5, 0x255DC9C, 8192) blocking, sigcatchers 4^M
324 546099 [main] ved 1966225 _read: non-interruptible read^M
411 546510 [main] ved 1966225 fhandler_base::raw_read: ReadFile limit.c failed, Win32 error 33^M
314 546824 [main] ved 1966225 seterrno_from_win_error: /cygnus/netrel/src/cygwin-1.1.8-2/winsup/cygwin/fhandler.cc:239 errno 33^M
266 547090 [main] ved 1966225 geterrno_from_win_error: windows error 33 == errno 13^M
271 547361 [main] ved 1966225 _read: -1 = read (5<limit.c>, 0x255DC9C, 8192), bin 4096, errno 13^M
Jörg
EMail:joerg AT schily DOT isdn DOT cs DOT tu-berlin DOT de (home) Jörg Schilling D-13353 Berlin
js AT cs DOT tu-berlin DOT de (uni) If you don't have iso-8859-1
schilling AT fokus DOT gmd DOT de (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
- Raw text -