diff options
author | rrenderr <rrenderr@gmail.com> | 2018-01-10 13:41:29 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-01-10 12:41:29 +0100 |
commit | a1016245cc9dd217222c2d03d875cac4314c16f1 (patch) | |
tree | 040fe7d022ea778b8991db81b07c07114e018c97 /lib | |
parent | 50fb98d2607f5473ab83f5d8293c9a243eb4d7c8 (diff) | |
download | Nim-a1016245cc9dd217222c2d03d875cac4314c16f1.tar.gz |
- fixed lock of a program when proc echo is called on Android 5.x.x (#7054)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/sysio.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index 4348ffbb5..f638b299c 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -406,7 +406,8 @@ proc setStdIoUnbuffered() = when declared(stdout): proc echoBinSafe(args: openArray[string]) {.compilerProc.} = - when not defined(windows): + # flockfile deadlocks some versions of Android 5.x.x + when not defined(windows) and not defined(android): proc flockfile(f: File) {.importc, noDecl.} proc funlockfile(f: File) {.importc, noDecl.} flockfile(stdout) @@ -415,7 +416,7 @@ when declared(stdout): const linefeed = "\n" # can be 1 or more chars discard c_fwrite(linefeed.cstring, linefeed.len, 1, stdout) discard c_fflush(stdout) - when not defined(windows): + when not defined(windows) and not defined(android): funlockfile(stdout) {.pop.} |