fixes #811
This commit is contained in:
parent
49fa421ba7
commit
f95a8df243
2 changed files with 7 additions and 4 deletions
|
|
@ -1037,10 +1037,10 @@ proc execShellCmd*(command: string): int {.rtl, extern: "nos$1",
|
||||||
## the process has finished. To execute a program without having a
|
## the process has finished. To execute a program without having a
|
||||||
## shell involved, use the `execProcess` proc of the `osproc`
|
## shell involved, use the `execProcess` proc of the `osproc`
|
||||||
## module.
|
## module.
|
||||||
when defined(windows):
|
when defined(linux):
|
||||||
result = c_system(command)
|
|
||||||
else:
|
|
||||||
result = c_system(command) shr 8
|
result = c_system(command) shr 8
|
||||||
|
else:
|
||||||
|
result = c_system(command)
|
||||||
|
|
||||||
# Environment handling cannot be put into RTL, because the ``envPairs``
|
# Environment handling cannot be put into RTL, because the ``envPairs``
|
||||||
# iterator depends on ``environment``.
|
# iterator depends on ``environment``.
|
||||||
|
|
|
||||||
|
|
@ -791,7 +791,10 @@ elif not defined(useNimRtl):
|
||||||
proc csystem(cmd: cstring): cint {.nodecl, importc: "system".}
|
proc csystem(cmd: cstring): cint {.nodecl, importc: "system".}
|
||||||
|
|
||||||
proc execCmd(command: string): int =
|
proc execCmd(command: string): int =
|
||||||
|
when defined(linux)
|
||||||
result = csystem(command) shr 8
|
result = csystem(command) shr 8
|
||||||
|
else:
|
||||||
|
result = csystem(command)
|
||||||
|
|
||||||
proc createFdSet(fd: var TFdSet, s: seq[PProcess], m: var int) =
|
proc createFdSet(fd: var TFdSet, s: seq[PProcess], m: var int) =
|
||||||
FD_ZERO(fd)
|
FD_ZERO(fd)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue