I don’t know much about how these things work, but you pick up a little here and a little there. Recently, I had an occasion where I needed to restart the Finder. It didn’t restart by itself, so I had to give it a little push.
Curiously, I saw a Terminal window open with this inside:
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder ; exit;
Dropbox: Entered INJECT_pthread_entry
Dropbox: Installing event loop timer
Dropbox: proc: 0x10d24ee62
Dropbox: upp: 0x10d24ee62
Dropbox: InstallEventLoopTimer: 0x7fff9118451b
Dropbox: GetMainEventLoop: 0x7fff9112daeb
Dropbox: timer installed!
Dropbox: Loading /Library/DropboxHelperTools/Dropbox_u501/DropboxBundle.bundle/Contents/MacOS/DropboxBundle
Dropbox: dlopen returned: 0x7fad43c15440
module initializer in main thread?: 1
So that’s how it works! (Sort of)