SMJobRemove(_:_:_:_:_:)
Removes the job with the specified label from the specified domain.
Declaration
func SMJobRemove(_ domain: CFString!, _ jobLabel: CFString, _ auth: UnsafeMutableRawPointer!, _ wait: Bool, _ outError: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> Boolfunc SMJobRemove(_ domain: CFString!, _ jobLabel: CFString, _ auth: AuthorizationRef!, _ wait: Bool, _ outError: UnsafeMutablePointer<Unmanaged<CFError>?>!) -> BoolParameters
- domain:
The job’s domain (for example, Ksmdomainsystemlaunchd).
- jobLabel:
The label identifier of the job to remove.
- auth:
An
AuthorizationRefcontaining the Ksmrightmodifysystemdaemons right if the specified domain is Ksmdomainsystemlaunchd. - wait:
Pass
trueto block until the process for the specified job has exited. - outError:
An output reference to a
CFErrorRefdescribing the specific error when removing the job, orNULLif no error occurred. It’s the responsibility of the app to release the error reference. This argument can beNULL.
Return Value
Returns true if the system successfully removes the job, otherwise false.
Discussion
If the job is currently running, it conditionally blocks until the running process has exited.