Previously, the PIDs of any running instances of the game on the remote
device were found with `pgrep`, whose output was passed as parameters to
`kill`. The problem with doing this is that passing zero arguments to
`kill` (which happens when no instances of the game are running
remotely) is an error: it shows the command usage, and exits with status
2 indicating a command-line syntax error:
$ kill
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
$ echo $?
2
As far as I can tell, all systems that have a `pgrep` command also have
a `pkill` command which accepts (a superset of) the same parameters as
`pgrep` and kills the matched processes instead of listing them on
STDOUT.
In the case where no processes match, `pkill` exits with status 1; but
does so silently.
Invoke `pkill` rather than `pgrep` + `kill`.
macOS platform port
This folder contains the C++, Objective-C and Objective-C++ code for the macOS platform port.
This platform uses shared Apple code (drivers/apple).
See also misc/dist/macos folder for additional files used
by this platform. misc/dist/macos_tools.app is
an .app bundle template used for packaging the macOS editor, while
misc/dist/macos_template.app is used for
packaging macOS export templates.
Documentation
- Compiling for macOS
- Instructions on building this platform port from source.
- Exporting for macOS
- Instructions on using the compiled export templates to export a project.
- Running Godot apps on macOS
- Instructions on running Godot projects on macOS.