Latency debug script: include MIDI ports
[ardour.git] / scripts / _system_exec.lua
1 ardour { ["type"] = "EditorAction", name = "System Exec" }
2
3 function factory () return function ()
4         -- ** EXAMPLES TO RUN EXTERNAL APPLICATIONS ** --
5
6         -- run a command in a shell and wait for it to complete.
7         --
8         -- Details: basically just system(3), except on Unix like systems with
9         -- memory-locking, this call is special-cased to use vfork and close
10         -- file-descriptors. On other systems it defaults to Lua's os-library
11         -- built-in os.execute system() call.
12         os.execute ("date > /tmp/testdate")
13
14         -- os.forkexec() works as fire-and-forget. execv(3) style
15         --
16         -- Details: It calls vfork() and exec() under the hood, passing each
17         -- argument separately to exec (and needs a full-path to the binary).
18         os.forkexec ("/usr/bin/xterm")
19         os.forkexec ("/bin/sh", "-c", "import --frame \"/tmp/scr_$(date).png\"")
20 end end