Commit Graph

6 Commits

Author SHA1 Message Date
Edward Thomson
2ad709e77c process: resolve paths for win32
When using `git_process_new` on win32, resolve the path to the
application in the same way that we do on POSIX.

Search `PATH` for command to execute (unless the given executable is
fully qualified). In addition, better match Windows executable lookup
behavior itself (allowing the command to be `foo`, and looking for a
matching `foo.exe` or `foo.cmd`.)
2025-12-01 21:44:36 +00:00
Edward Thomson
e78eec28c3 vector: free is now dispose
In keeping with the libgit2 pattern, we _dispose_ a structure that is
not heap allocated, and _free_ a structure's contents _and the structure
itself_.
2024-09-30 21:28:36 +01:00
Edward Thomson
cc965243d6 process: test /usr/bin/false on BSDs
Our process tests were previously testing that false is
`/bin/false` everywhere except macOS, where it exists as
`/usr/bin/false`. . Extend this to all BSDs.
2023-12-13 16:40:00 +00:00
Edward Thomson
d7060aff36 process: provide cmdline-handling and execv style
Provide both cmdline-style handling (passing it to the shell on POSIX,
or directly to CreateProcess on win32) and execv style (passing it
directly to execv on POSIX, and mangling it into a single command-line
on win32).
2023-08-30 20:46:23 +01:00
Edward Thomson
7a8c4d8bd2 process: test SIGTERM detection
We can't reliably detect SIGPIPE on close because of platform
differences. Track `pid` and send `SIGTERM` to a function and ensure
that we can detect it.
2023-08-30 20:46:22 +01:00
Edward Thomson
bc97d01c03 Introduce git_process class that invokes processes 2023-08-30 20:45:13 +01:00