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
Commit 9e3500b
Browse filesBrowse the repository at this point in the historyBrowse files
l-layer: a program may be started where the system says so; Windows musl and PureDarwin start programs
The interpreter decided whether a name may be started by stat's execute
bits. A system that keeps no execute permission reports none there:
Windows under openkal's C library, and PureDarwin, whose root volume is
ext4, which openkal-macos does not claim execute bits for
(mcpplibs/openkal-macos#53). access(X_OK) asks the system that decides,
and is the right question on Unix too (the owner's bit says nothing about
another user's file). lexec.c's search and lselfpath.c's argv[0] fallback
both ask it now.
Under openkal's C library (CMD_LIBC_MUSL):
- fork reports ENOSYS where openkal.space is absent (Windows): the program
is started with posix_spawn instead, its argument zero in the system's
spelling (cmd.exe takes a '/' in its own name for a switch);
- the search follows the system's conventions, which openkal states
(kal_env_system): on Windows PATH is split on ';', a name with a volume
is not searched for, and a name without a suffix is tried with each
suffix PATHEXT lists, as the C library's own search does.
Measured: x86_64-windows-musl (wine) and PureDarwin (twice) give the whole
script, the program start included; linux-gnu, x86_64/i686-linux-musl
unchanged; every musl row builds; make -std=c89 gives main's two warnings.
CI: neither row leaves the program start out any more.
Copy file name to clipboardExpand all lines: .github/mcpp/test.bat
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ if not exist okt echo okt removed
22
22
rem end of files
23
23
set /a X=6*7
24
24
echo X=%X%
25
-
rem process: a program the interpreter starts, itself (a run where no program can be started leaves this part out)
25
+
rem process: a program the interpreter starts, through COMSPEC: itself, on Windows the system's (a run where no program can be started leaves this part out)
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,7 +189,7 @@ mcpp pack cmd.exe --profile web --target wasm32-emscripten --pkg-format web
189
189
<details>
190
190
<summary>More targets: Linux, Windows, macOS, FreeBSD, NetBSD, OpenBSD, Android, WebAssembly, openkal images, UEFI, DOS, System V, GNU/Hurd and Haiku</summary>
191
191
192
-
**runs**: a test batch script gives the same output as on Linux x86_64 (checked by `.github/workflows/mcpp.yml`); **starts**: the interpreter starts and exits; **builds**: not run. The script's part that starts a program (the interpreter itself, through `%COMSPEC%`) is left out where no program can be started: the browser and node (WebAssembly), an openkal image under okrun (it starts a program but not an image, mcpplibs/openkal-image#42), UEFI, both DOS rows, `x86_64-windows-musl`, whose interpreter does not yet find a program named by a path with a drive letter, and PureDarwin, where openkal-macos reports no execute bit (mcpplibs/openkal-macos#53).
192
+
**runs**: a test batch script gives the same output as on Linux x86_64 (checked by `.github/workflows/mcpp.yml`); **starts**: the interpreter starts and exits; **builds**: not run. The script's part that starts a program (through `%COMSPEC%`: the interpreter itself, on Windows the system's) is left out where no program can be started: the browser and node (WebAssembly), an openkal image under okrun (it starts a program but not an image, mcpplibs/openkal-image#42), UEFI and both DOS rows.
0 commit comments