Type Method


Creates a new dispatch source object that monitors the arrival of a UNIX signal.


class func makeSignalSource(signal: Int32, queue: DispatchQueue? = nil) -> DispatchSourceSignal



The Unix signal number to monitor.


The dispatch queue to use when executing the installed handlers.

Return Value

A dispatch source object that conforms to the DispatchSourceSignal protocol.


After creating the dispatch source, use the methods of the DispatchSourceProtocol protocol to install the event handlers you need. The returned dispatch source is in the inactive state initially. When you are ready to begin processing events, call its activate() method.

See Also

Creating a Signal Source

protocol DispatchSourceSignal

A dispatch source that monitors the current process for UNIX signals.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software