Open
Description
Please consider adding a "SDL_GetCurrentProcessId()" and "SDL_GetCurrentProcessName()" implementation.
- SDL_GetCurrentProcessId would return the current pid
- SDL_GetCurrentProcessName would return the executable name
Both should be cached, since they're static, with the second maybe saved alongside the current executable path.
Alternative:
- GetCurrentProcess returning a SDL_Process structure with the properties being the current pid and a new property being the process name (SDL.process.name)
Obviously, I can imagine this is low-prio compared to other bugs or requests, but it'd be appreciated if you kept it in mind, as since most operating systems are posix-based, it shouldn't be hard to implement cross-platform.
Use cases:
- log file to match the exe
- maybe monitoring the current process via the id
- some files with local config files that match the exe for games that allow modding (and would duplicate executables)
- the current pid might be useful if the current SDL process API will extend to more functions
- adding a failsafe in SDL_KillProcess that it should return and fail if the process is the one that is the current process
- maybe some games want to verify that users didn't tamper or execute any executables that are not approved by the game (i.e. patched for some cheats and having a separately patched exe so that Steam or other platforms don't overwrite it)
- other use cases that don't come to mind atm :)
Metadata
Metadata
Assignees
Labels
No labels