summaryrefslogtreecommitdiffstats
path: root/DOCS/man/lua.rst
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-12-17 01:25:23 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-02-13 20:16:01 -0800
commit8f9785d128eef0eae656d32d664ae1a8bff0bb12 (patch)
tree61250cdc4cd0505492e245757450e1a672713640 /DOCS/man/lua.rst
parentf17246fec15963e7cc098cf7ba7263ad02877b99 (diff)
downloadmpv-8f9785d128eef0eae656d32d664ae1a8bff0bb12.tar.bz2
mpv-8f9785d128eef0eae656d32d664ae1a8bff0bb12.tar.xz
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.
Diffstat (limited to 'DOCS/man/lua.rst')
-rw-r--r--DOCS/man/lua.rst4
1 files changed, 4 insertions, 0 deletions
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