osproc: make failed execv an exception (when using fork or clone)

startProcessAuxFork creates a pipe, which is used by a child to pass
an error code if execv fails.
This commit is contained in:
Michał Zieliński 2014-02-14 15:51:06 +01:00
commit 4c09fc110f
2 changed files with 64 additions and 23 deletions

View file

@ -2066,6 +2066,7 @@ proc pthread_spin_unlock*(a1: ptr Tpthread_spinlock): cint {.
proc pthread_testcancel*() {.importc, header: "<pthread.h>".}
proc exitnow*(code: int): void {.importc: "_exit", header: "<unistd.h>".}
proc access*(a1: cstring, a2: cint): cint {.importc, header: "<unistd.h>".}
proc alarm*(a1: cint): cint {.importc, header: "<unistd.h>".}
proc chdir*(a1: cstring): cint {.importc, header: "<unistd.h>".}