Commit b77d9f5
authored
Bugfix (#1190)
* posix_file_lock: pass lockp directly to fcntl\n\nBugfix: previously passed address-of pointer variable, causing fcntl to receive an invalid pointer (EFAULT/lock failure). Aligns with POSIX fcntl(fd, cmd, struct flock*). Pure fix.
* mfc: fix scatter write loop to use current element (i->base/len)\n\nBugfix: loop used scats->base/len, repeating the first buffer each iteration. Use iterator element to write each scatter segment.
* posix_file: copy-assign uses dup when target fd==-1 (unlikely), else dup2\n\nIf target is closed, duplicate source fd; otherwise reuse target via dup2. Avoids dup2(old,-1) failure; no source-closed special-casing.1 parent c2fe5c9 commit b77d9f5
3 files changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | | - | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1277 | 1284 | | |
1278 | 1285 | | |
1279 | 1286 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
0 commit comments