Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
FYI, POSIX rename() is atomic. Perl's rename is based on POSIX rename() but Perl may use a different API when compiled on a system that doesn't (appear to) have POSIX rename() (hence the weasel words about it perhaps not silently clobbering). Therefore, Perl's rename will not be atomic on some non-POSIX systems. I can't think of any APIs that Perl has taken from Win32. Where a Perl API matches a Win32 API it is almost always because the Win32 API was made to match the POSIX (or pre-POSIX) API. While I concur with your preference to "use the safer of the two" when selecting, I'd certainly be more surprised to find Perl using a Win32 API that conflicts with a POSIX API. BTW, I wish Perl's system() had asynchronous launching built in so that could be done portably. It is rather ironic that asynchronous launching is built into the under-the-covers API that Perl uses but it doesn't expose this nice feature in the language -- well, on nearly OS/2 systems (including Win32) you can use system(1,...) to launch a command into the background, but that isn't portable and making that API choice portable poses problems on less OS/2ish systems like Unix where commands are passed a list of arguments instead of a command line. - tye In reply to Re^3: A DWIM too far? (POSIX)
by tye
|
|