mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
parent
5fae582e82
commit
cf9252f429
2 changed files with 15 additions and 10 deletions
|
@ -5188,11 +5188,14 @@ function unix.fork() end
|
|||
--- unix.execve(prog, {prog, '-hal', '.'}, {'PATH=/bin'})
|
||||
--- unix.exit(127)
|
||||
---
|
||||
--- We automatically suffix `.com` and `.exe` for all platforms when
|
||||
--- path searching. By default, the current directory is not on the
|
||||
--- path. If `prog` is an absolute path, then it's returned as-is. If
|
||||
--- `prog` contains slashes then it's not path searched either and will
|
||||
--- be returned if it exists.
|
||||
--- If `prog` is an absolute path, then it's returned as-is. If `prog`
|
||||
--- contains slashes then it's not path searched either and will be
|
||||
--- returned if it exists. On Windows, it's recommended that you install
|
||||
--- programs from cosmos to c:/bin/ without any .exe or .com suffix, so
|
||||
--- they can be discovered like they would on UNIX. If you want to find
|
||||
--- a program like notepad on the $PATH using this function, then you
|
||||
--- need to specify "notepad.exe" so it includes the extension.
|
||||
---
|
||||
---@param prog string
|
||||
---@return string path
|
||||
---@overload fun(prog: string): nil, error: unix.Errno
|
||||
|
|
|
@ -2877,11 +2877,13 @@ UNIX MODULE
|
|||
unix.execve(prog, {prog, '-hal', '.'}, {'PATH=/bin'})
|
||||
unix.exit(127)
|
||||
|
||||
We automatically suffix `.com` and `.exe` for all platforms when
|
||||
path searching. By default, the current directory is not on the
|
||||
path. If `prog` is an absolute path, then it's returned as-is. If
|
||||
`prog` contains slashes then it's not path searched either and will
|
||||
be returned if it exists.
|
||||
If `prog` is an absolute path, then it's returned as-is. If `prog`
|
||||
contains slashes then it's not path searched either and will be
|
||||
returned if it exists. On Windows, it's recommended that you install
|
||||
programs from cosmos to c:/bin/ without any .exe or .com suffix, so
|
||||
they can be discovered like they would on UNIX. If you want to find
|
||||
a program like notepad on the $PATH using this function, then you
|
||||
need to specify "notepad.exe" so it includes the extension.
|
||||
|
||||
unix.execve(prog:str[, args:List<*>, env:List<*>])
|
||||
└─→ nil, unix.Errno
|
||||
|
|
Loading…
Reference in a new issue