All Projects → jdspoone → SampleOSXLaunchDaemon

jdspoone / SampleOSXLaunchDaemon

Licence: MIT license
A simple launch daemon for macOS which communicates with a client application via XPC

Programming Languages

objective c
16641 projects - #2 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to SampleOSXLaunchDaemon

tpm2-abrmd
TPM2 Access Broker & Resource Management Daemon implementing the TCG spec.
Stars: ✭ 97 (+162.16%)
Mutual labels:  daemon
vps host server
VPS Hosting Server Daemon for provisioning, monitoring, and communications with the central system.
Stars: ✭ 12 (-67.57%)
Mutual labels:  daemon
bustd
Process killer daemon for out-of-memory scenarios
Stars: ✭ 182 (+391.89%)
Mutual labels:  daemon
ShellRemoteBot
Shell remote control from telegram (SSH/terminal emulator)
Stars: ✭ 28 (-24.32%)
Mutual labels:  daemon
mpv-trakt-sync-daemon
Python daemon that scrobbles watch progress from https://mpv.io to https://trakt.tv
Stars: ✭ 41 (+10.81%)
Mutual labels:  daemon
macops-MOLXPCConnection
An NSXPCConnection wrapper that does signature validation
Stars: ✭ 21 (-43.24%)
Mutual labels:  xpc
conceal-api
Conceal API - JavaScript Interface (RPC/API)
Stars: ✭ 18 (-51.35%)
Mutual labels:  daemon
php-daemon
Easily daemonize PHP scripts
Stars: ✭ 70 (+89.19%)
Mutual labels:  daemon
rescrobbled
MPRIS music scrobbler daemon
Stars: ✭ 152 (+310.81%)
Mutual labels:  daemon
Swatch
Watcher for Unit Tests written in Swift
Stars: ✭ 55 (+48.65%)
Mutual labels:  daemon
hasses
Hyper's Asynchronous Server Sent event (SSE) notification Server
Stars: ✭ 18 (-51.35%)
Mutual labels:  daemon
final-pm
Finally a good node.js process manager.
Stars: ✭ 21 (-43.24%)
Mutual labels:  daemon
funcd
Daemon for functional keys (works without X11)
Stars: ✭ 14 (-62.16%)
Mutual labels:  daemon
shinit
Basic Init Daemon in POSIX sh
Stars: ✭ 17 (-54.05%)
Mutual labels:  daemon
gon2n
Go bindings, management daemons and CLIs for n2n edges and supernodes.
Stars: ✭ 67 (+81.08%)
Mutual labels:  daemon
watchdogd
Advanced system & process supervisor for Linux
Stars: ✭ 146 (+294.59%)
Mutual labels:  daemon
GChan
Scrape boards and threads from 4chan (8kun WIP). Downloads images, videos and HTML if desired.
Stars: ✭ 31 (-16.22%)
Mutual labels:  daemon
dohd
Very fast DNS-over-HTTPS to DNS proxy with emphasis on privacy (no logging)
Stars: ✭ 14 (-62.16%)
Mutual labels:  daemon
haaukins
A Highly Accessible and Automated Virtualization Platform for Security Education
Stars: ✭ 148 (+300%)
Mutual labels:  daemon
npshell
Command line music queue manager. A music player from the comfort of your own shell.
Stars: ✭ 15 (-59.46%)
Mutual labels:  daemon
Sample XPC Launch Daemon ReadMe

This Xcode project demonstrates a basic launch daemon which:
  -maintains an XPC listener to handle incoming connections from it's client(s)
  -signals it's clients via Darwin notifications

The project includes:
  -a Daemon intended to be run via launchd. It maintains a count, and responds to XPC requests for its count and to increment its count. Upon incrementing its count, it notifies all interested parties via Darwin notifications.
  -a Client, from which you can ask the Daemon for it's current count, and ask it to increment it's count.
  -an install script, which copies the daemon's executable to /Library/PrivilegedHelperTools/, the Daemon's launchd.plist to /Library/LaunchDaemons/, and then loads the daemon via launchctl
  -an uninstall script, which unloads the daemon via launchctl, and removes the daemon's executable and launchd.plist

To run the project:
  -run the Install scheme
  -run the Client scheme
    -click the button and witness XPC communication and Darwin notifications in action!
  -run the Uninstall scheme

NOTE: You will need to set SUDO_ASKPASS to run the installation and uninstallation targets.

The daemon needs to be launched via launchd if you want the XPC stuff to actually work.
However, if you're writing a more complicated daemon, you will probably want to be able to debug the daemon with Xcode.
To do this, you'll need to do the follwing:
  -modify daemon-Launchd.plist so the WaitForDebugger flag is set to YES
  -ensure the Daemon's Xcode scheme:
    -runs as Root
    -waits for the executable to be launched
  -modify install.sh so it does NOT load the daemon
  -run the Install scheme
  -run the Daemon scheme, and then load the daemon via launchctl
    -you've got to do it in this order, or the Xcode debugger will never attach

Remember to set the WaitForDebugger flag to NO again before releasing anything!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].