Name

external inline, externalinline, kPMExternalExternalInline — Execute the inline content.

Synopsis

external inline structure { arguments, user, group, root directory, working directory, additional environment, redirect standard out, redirect standard error, process scheduling priority, throttle disk reads, file creation mode mask, soft resource limits, hard resource limits, type, inline, encoding };
arguments : array of strings, optional
user : string, default, length 1..1024
group : string, length 1..1024, optional
root directory : string, length 1..1024, optional
working directory : string, default, length 1..1024, optional
additional environment : dictionary, optional
redirect standard out : string, length 1..1024, optional
redirect standard error : string, length 1..1024, optional
process scheduling priority : integer, optional, range -20..20
throttle disk reads : boolean, default, optional
file creation mode mask : integer, optional
soft resource limits : resource limits structure, optional
hard resource limits : resource limits structure, optional
type : string, choice, default
inline : string, length 1..n
encoding : string, choice, default, optional

Description

Execute the inline content.

Fields

arguments. Arguments to pass to the executable.

arguments is an array of strings. arguments is optional.

user. User to execute process as.

Short user name.

user is a string. If user is omitted, the default root is used. user must be between 1 and 1024 characters long, inclusive.

group. Group to execute process as.

Short group name. If no group is provided, the primary group of the user is used.

group is a string. group is optional. group must be between 1 and 1024 characters long, inclusive.

root directory. Set the executable's root directory (chroot).

root directory is a string. root directory is optional. root directory must be between 1 and 1024 characters long, inclusive.

working directory. Set the executable's working directory (chdir).

Relative paths are resolved with respect to any root directory.

working directory is a string. If working directory is omitted, the default / is used. working directory is optional. working directory must be between 1 and 1024 characters long, inclusive.

additional environment. Set additional environment variables for the executable.

The dictionary's keys and values must be strings.

additional environment is a dictionary. additional environment is optional.

redirect standard out. Redirect the executable's standard output (stdout) to a file.

An absolute path to which the executable's output to appended. The file is created as needed. Removing the file while the executable is running will cause undefined behaviour.

redirect standard out is a string. redirect standard out is optional. redirect standard out must be between 1 and 1024 characters long, inclusive.

redirect standard error. Redirect the executable's standard error (stderr) to a file.

An absolute path to which the executable's error to appended. The file is created as needed. Removing the file while the executable is running will cause undefined behaviour.

redirect standard error is a string. redirect standard error is optional. redirect standard error must be between 1 and 1024 characters long, inclusive.

process scheduling priority. Set the executable's scheduling priority (nice).

process scheduling priority is an integer. process scheduling priority is optional. process scheduling priority must be between -20 and 20, inclusive.

throttle disk reads. Throttle the executable's disk reads.

Available on Mac OS X 10.5 (Leopard) and later.

throttle disk reads is a boolean. If throttle disk reads is omitted, the default false is used. throttle disk reads is optional.

file creation mode mask. Set the executable's file creation mode mask (umask).

file creation mode mask is an integer. file creation mode mask is optional.

soft resource limits. Set the executable's soft resource limits.

soft resource limits is a resource limits structure. soft resource limits is optional.

hard resource limits. Set the executable's hard resource limits.

hard resource limits is a resource limits structure. hard resource limits is optional.

type. Type of external being described.

type is a string. If type is omitted, the default external is used. type must be inline, kPMExternalType_Inline.

inline. Inline content to write to disk and execute.

inline is typically a shell script or other language.

inline is a string. inline must be 1 characters or more.

encoding. Encoding format used by inline.

Encoding is typically 'UTF-8 no BOM' but may be provided in another format.

encoding is a string. If encoding is omitted, the default UTF-8 no BOM is used. encoding is optional. encoding must be one of the following four constants:

  • UTF-8, kPMExternalEncoding_UTF8.
  • UTF-8 no BOM, kPMExternalEncoding_UTF8NoBOM.
  • UTF-16, kPMExternalEncoding_UTF16.
  • UTF-16 no BOM, kPMExternalEncoding_UTF16NoBOM.