Reputation: 121
Python: setproctitle
How to do the same thing in Swift?
Upvotes: 1
Views: 192
Reputation: 11494
You can mutate that ProcessInfo.processName
property:
ProcessInfo.processInfo.processName = "New Name"
The documentation for this property does give this warning
User defaults and other aspects of the environment might depend on the process name, so be very careful if you change it. Setting the process name in this manner is not thread safe.
Upvotes: 2