You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
POSIX process launch hides exec failures and loses the actual error #211
POSIX process creation returns a process handle even when execvp fails. It also labels permission failures as command-not-found and loses errno. The caller cannot reliably distinguish a launch failure from a program that genuinely exits with code 127.
Regression coverage first: add test/regression/ProcessPosixStartError in the existing regression layout. Check that an explicit missing executable fails during creation. Extend coverage to a file without execute permission and to a real child that exits 127, which must remain a normal process result. Keep the args=null shell-command path separate from direct executable invocation.
Confirmed on Linux x86_64 with Haxe 4.3.3:
missing executable: constructor succeeded, status=127
stderr: Command not found : /no-such-libhxcpp-command
existing non-executable file: constructor succeeded, status=127
stderr: Command not found : /tmp/libhxcpp-process-audit/not-executable
In src/hx/libs/std/Process.cpp, the parent reports success as soon as fork succeeds. The child handles every execvp error by writing a prebuilt generic message and calling _exit(127). Pipe and fork failure paths also return null without preserving their reason.
Use a launch-error handshake that carries errno from the pre-exec child back to the parent, or an appropriate spawn API. Keep the child path async-signal-safe. Successful exec should close the handshake automatically, and failed launch cleanup must close all pipe ends and reap the child.
Related to #75, which addressed native Windows diagnostics. Haxe's cpp Process constructor currently discards caught native error details too, so exposing those details through sys.io.Process needs a standard-library change. NativeProcess should still retain the actual POSIX launch error.
Activity
Report a failed exec when starting a POSIX process