@@ -1281,6 +1281,59 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
1281
1281
< a href ="/pkg/os/#Executable "> < code > Executable</ code > </ a > returns
1282
1282
the path name of the running executable.
1283
1283
</ p >
1284
+
1285
+ < p > <!-- CL 30614 -->
1286
+ An attempt to call a method on
1287
+ an < a href ="/pkg/os/#File "> < code > os.File</ code > </ a > that has
1288
+ already been closed will now return the new error
1289
+ value < a href ="/pkg/os/#ErrClosed "> < code > os.ErrClosed</ code > </ a > .
1290
+ Previously it returned a system-specific error such
1291
+ as < code > syscall.EBADF</ code > .
1292
+ </ p >
1293
+
1294
+ < p > <!-- CL 31358 -->
1295
+ On Unix systems, < a href ="/pkg/os/#Rename "> < code > os.Rename</ code > </ a >
1296
+ will now return an error when used to rename a directory to an
1297
+ existing empty directory.
1298
+ Previously it would fail when renaming to a non-empty directory
1299
+ but succeed when renaming to an empty directory.
1300
+ This makes the behavior on Unix correspond to that on other systems.
1301
+ </ p >
1302
+
1303
+ < p > <!-- CL 32451 -->
1304
+ On Windows, long absolute paths are now transparently converted to
1305
+ extended-length paths (paths that start with < code > \\?\</ code > ).
1306
+ This permits the package to work with files whose path names are
1307
+ longer than 260 characters.
1308
+ </ p >
1309
+
1310
+ < p > <!-- CL 29753 -->
1311
+ On Windows, < a href ="/pkg/os/#IsExist "> < code > os.IsExist</ code > </ a >
1312
+ will now return < code > true</ code > for the system
1313
+ error < code > ERROR_DIR_NOT_EMPTY</ code > .
1314
+ This roughly corresponds to the existing handling of the Unix
1315
+ error < code > ENOTEMPTY</ code > .
1316
+ </ p >
1317
+
1318
+ < p > <!-- CL 32152 -->
1319
+ On Plan 9, files that are not served by < code > #M</ code > will now
1320
+ have < a href ="/pkg/os/#ModeDevice "> < code > ModeDevice</ code > </ a > set in
1321
+ the value returned
1322
+ by < a href ="/pkg/os/#FileInfo "> < code > FileInfo.Mode</ code > </ a > .
1323
+ </ p >
1324
+ </ dd >
1325
+ </ dl >
1326
+
1327
+ < dl id ="os_signal "> < dt > < a href ="/pkg/os/signal/ "> os/signal</ a > </ dt >
1328
+ < dd >
1329
+ < p > <!-- CL 32796 -->
1330
+ In a Go library built with < code > -buildmode=c-archive</ code >
1331
+ or < code > c-shared</ code > , when C code calls a Go function,
1332
+ the < code > SIGPIPE</ code > signal will be treated as usual for Go code.
1333
+ In particular, when < code > SIGPIPE</ code > is triggered by a write
1334
+ to a closed Go network connection, it will not cause the program
1335
+ to exit.
1336
+ </ p >
1284
1337
</ dd >
1285
1338
</ dl >
1286
1339
0 commit comments