From 8f9785d128eef0eae656d32d664ae1a8bff0bb12 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 17 Dec 2017 01:25:23 +0100 Subject: lua+js: Implement utils.getpid() Usable for uniquely identifying mpv instances from subprocesses, controlling mpv with AppleScript, ... Adds a new mp_getpid() wrapper for cross-platform reasons. --- DOCS/man/lua.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'DOCS/man/lua.rst') diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst index 2e354c282f..53e6d1db21 100644 --- a/DOCS/man/lua.rst +++ b/DOCS/man/lua.rst @@ -682,6 +682,10 @@ strictly part of the guaranteed API. The function returns ``nil``. +``utils.getpid()`` + Returns the process ID of the running mpv process. This can be used to identify + the calling mpv when launching (detached) subprocesses. + ``utils.parse_json(str [, trail])`` Parses the given string argument as JSON, and returns it as a Lua table. On error, returns ``nil, error``. (Currently, ``error`` is just a string -- cgit v1.2.3