Is there any reference to tell the difference between 'Program' and 'ProgramArguments' in launchdaemon.plist?
I saw some plist only have 'ProgramArguments', but some also have 'Program', I want to make a clear understanding.
Thanks in advance.
It's indeed a bit confusing, but in most cases both forms are valid.
From the documentation:
Program < string>
This key maps to the first argument of execvp(3). If this key is missing, then the first element of the array of strings provided to theProgramArguments
will be used instead. This key is required in the absence of theProgramArguments
key.ProgramArguments < array of strings>
This key maps to the second argument of execvp(3). This key is required in the absence of theProgram
key. Please note: many people are confused by this key. Please read execvp(3) very carefully!