summary refs log tree commit diff stats
path: root/lib/pure/os.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #10273 execShellCmd now returns nonzero when child killed with signal ↵Timothee Cour2019-01-131-8/+13
| | | | | | | | | | + other fixes (#10274) * s/exitStatus(...)/exitStatusLikeShell(...)/ * fix #10273 execShellCmd now returns nonzero when child exits with signal * test case for #10249 and explanation for the bug * fix test failure * add tests/nim.cfg
* os.execShellCmd: fixes #10231 (#10232)alaviss2019-01-081-1/+3
| | | | | | | Darwin has long deprecated the wait union, but their macros still assume it unless you define _POSIX_C_SOURCE. This trips up C++ compilers. This commit duplicates the behavior of WEXITSTATUS when _POSIX_C_SOURCE is defined.
* os.execShellCmd: use WEXITSTATUS to retrieve exit code (#10222)alaviss2019-01-071-1/+1
| | | | | | | According to POSIX, system() shall returns the termination status in the format specified by waitpid(), which means WEXITSTATUS should be used to retrieve the exit code portably. This fixes execShellCmd on Haiku.
* Fix the tuple returned by `os.splitFile()` in documentation (#10197)Hugo Locurcio2019-01-051-1/+1
|
* expandFilename on windows is now consistent with other platforms (#10154)Neelesh Chandola2019-01-041-42/+48
|
* fixes #10066Araq2018-12-211-19/+27
|
* os.walkDir: correctly evaluate paths when relative = true (#10057) [backport]alaviss2018-12-211-4/+5
|
* fix test failureTimothee Cour2018-12-191-2/+4
|
* fix #8255 numerous issues with splitFileTimothee Cour2018-12-191-4/+13
|
* add `getCurrentCompilerExe` to vmops (eg allows to get nim compiler at CT); ↵Timothee Cour2018-12-181-1/+8
| | | | add tests for vmops (#9925)
* os.nim: use the new pathnorm.normalizePath implementationAraq2018-12-141-24/+25
|
* fixes joinPath regressionsAraq2018-12-131-1/+4
|
* os.nim: big refactoring, use the new pathnorm that was extracted by ↵Araq2018-12-131-151/+99
| | | | compiler/pathutils.nim; added os.relativePath
* Merge pull request #9803 from GULPF/walkdirrec-relativeAndreas Rumpf2018-12-061-7/+12
|\ | | | | Add `relative` parameter to walkDirRec
| * Add `relative` parameter to walkDirRecOscar Nihlgård2018-11-261-7/+12
| |
* | address commentsTimothee Cour2018-12-041-1/+1
| |
* | fixupTimothee Cour2018-12-031-1/+1
| |
* | address commentsTimothee Cour2018-12-031-0/+9
|/
* Fixes #9671 (#9750)Randy Smith2018-11-191-2/+0
|
* deprecated ospaths (#9665)Andreas Rumpf2018-11-091-94/+807
|
* fix #8225 os.isHidden was buggy on posix (#8315)Timothee Cour2018-10-151-23/+17
| | | | | | * fix #8225 isHidden was broken on posix * scope rest of tos.nim under blocks to avoid variable scope bugs
* os: use unlink() to remove file (#9220)alaviss2018-10-091-3/+1
| | | | | removeFile() behavior should now be consistant between Windows and POSIX Fixes #9200
* [os] clarify docs for existsDir (#9212)Timothee Cour2018-10-091-1/+1
| | | | | | * Update os.nim * Update os.nim
* Fix #9126: use splitPath instead of substrYasuhiro Horimoto2018-09-301-2/+2
|
* os: add getAppFilename() implementation for HaikuLeorize2018-09-241-0/+20
|
* os.nim: allow walkDir to work on hierarchies with dangling symbolic links; ↵Andreas Rumpf2018-09-241-5/+1
| | | | refs #9034
* even more strict isNil handling for strings/seqs in order to detect bugsAraq2018-08-221-3/+8
|
* Genode fixes (#8501)Emery Hemingway2018-08-161-2/+8
| | | | | | | | | | | | | * Genode fixes - wrap strings in "Genode::Cstring" when logging - define SIGABRT for Genode - disable GCC -fstack-protector - use log RPC for fatal messages - add --os:genode build to appveyor - define paramStr and paramCount * Select fixups for Genode POSIX
* Haiku support for Nim (#8542)alaviss2018-08-141-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * posix_other: Haiku now has spawn.h This is added per https://dev.haiku-os.org/ticket/13446 * posix_other: Add Haiku specific Dirent members * cpuinfo: Add an implementation for Haiku * distros: Add basic Haiku support * encodings: update Haiku support * fenv, math: Haiku now provides libm * times: Add Haiku struct members * ansi_c, osalloc: Add Haiku constants * threads: Add Haiku support * testament: Haiku uses LIBRARY_PATH * nim.cfg: Update Haiku support libnetwork should only be linked if network functions are used * threads: Haiku does not support -pthread switch * tworkingdir: Haiku's env is in /bin * posix_other: add SIGKILLTHR for Haiku * sockets: link with libnetwork on Haiku * coro: correct ucontext.h location http://pubs.opengroup.org/onlinepubs/009696699/basedefs/ucontext.h.html * coro: ucontext backend is not available on Haiku Haiku doesn't provide the <ucontext.h> header, as it was removed from POSIX * coro: fix setjmp backend The compiler does not allow statements after a noreturn function * nativesockets: Haiku doesn't support AI_V4MAPPED * system: hostOS can contains "haiku" * os: add support for Haiku's packagefs packagefs is read-only, but there are writable holes to the underlying file system as well * os: update constant for Haiku
* addresses issue #8391 show runtime context on some failed operations (#8393)Timothee Cour2018-07-231-4/+4
|
* add os.absolutePath; fixes #8174 (#8213)Timothee Cour2018-07-101-0/+20
| | | | | | | | | | * add os.absolutePath * fixup * fixup * Fixes absolutePath error message.
* Add normalizePath and testsFederico Ceratto2018-07-061-2/+43
|
* Nintendo switch support (#8069)Joey2018-06-271-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add config section for Nintendo Switch * Add compiler configuration for Nintendo Switch and it's CPU * Add specific lib code for Nintendo Switch * Add GC support for Nintendo Switch * Update changelog for Nintendo Switch * Update changelog with more info about fixed paths * Cleaned up GC memory management a bit * Relocate docs for Switch * Rename aarch64NoneElfGcc to nintendoSwitchGCC * Remove armv8a57 * Fix installer.ini * Reuse code in linux and amd64 * Add posix defs for nintendo switch * Add more defined sections for nintendo switch * Remove old comment * Add what's not supported for Nintendo Switch docs * Make nintendoswitch == posix * Remove DEVKITPRO references from nim.cfg * Make PR extccomp changes * Remove Result type alias * Add separate switch consts file * Update docs for nintendo switch * Fix travis errors with undefined consts and add correct wait.h procs
* fixes merge conflictAndreas Rumpf2018-06-111-1/+1
|\
| * Native access to Genode environmentEmery Hemingway2018-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a 'GenodeEnv' type and a 'componentConstructHook' to the system module. The 'componentConstructHook' allows for detection of POSIX style programs that exit implicitly or native Genode components that initialize to serve RPC requests and OS signals. This hook takes a 'GenodeEnv' argument so that the environment interface is passed cleanly to application code after globals are initialized. This is an typed pointer to a C++ object, procedures for accessing the environment will be available from a Nimble library and not included in the standard library. The standard library has an internal pointer to the environment object but this is not for external use, the undocumented global environment pointer has been removed.
* | fixex merge conflictsAraq2018-06-081-12/+20
|\|
| * Use higher time resolution when available in os.nim (#7709)Oscar Nihlgård2018-06-041-12/+20
| |
* | Merge branch 'devel' into araq-big-refactoringAndreas Rumpf2018-05-281-1/+2
|\|
| * Update existsFile documentation (#7888)Federico Ceratto2018-05-271-1/+2
| |
* | Merge branch 'devel' into araq-big-refactoringAndreas Rumpf2018-05-211-1/+3
|\|
| * remove unneeded check on lengthkoranza2018-05-191-1/+1
| |
| * check string lengths to avoid index out of boundkoranza2018-05-181-2/+4
| |
* | os.nim: don't use echo for error reportingAndreas Rumpf2018-05-181-1/+1
|/
* remove deprecated stuff from the stdlib; introduce better deprecation warningsAraq2018-05-051-16/+0
|
* more fixes for the new string behaviourAndreas Rumpf2018-04-301-11/+9
|
* remove dead code elimination option (#7669)Jacek Sieka2018-04-231-1/+1
|
* Add `fromWinTime` and deprecate `unixTimeToWinTime`/`winTimeToUnixTime` (#7641)Oscar Nihlgård2018-04-191-8/+6
|
* Change type of `Timeval.tv_sec` to `posix.Time` (#7646)Oscar Nihlgård2018-04-181-1/+1
|
* os.setLastModificationTime*(file: string, t: times.Time) (#7543)Hendrik2018-04-161-3/+19
| | | | | | | | | | | | | * add proc toFILETIME to winlean * add proc toWinTime to times * add proc setFileTime to winlean * openHandle with write access * add proc setLastModificationTime to os * moved epochDiff,rateDiff constants and proc toWinTime The constants were moved out of the when defined(JS) block so that they are alsways available in proc toWinTime. proc toWinTime was moved above the # Deprecated procs comment. Best new location seemed to be with the toUnix proc.
* explicit effects for existsOrCreateDirAndreas Rumpf2018-04-141-1/+2
|