OS X uses a process launching system called launchd which consolidates functions provided by Init scripts, crontab and more in *nix systems (see the Wikipedia article for a high level overview, and Apple’s Developer docs on launch daemons and agents for details). One of the abilities of launchd is to keep a process it launched alive, if so defined by its configuration file – in that case, the process will relaunch whenever it is terminated. Your problem with a process apparently persisting across reboots and manual termination sounds very much like a case of launchd initiated process with a keepAlive
key.
launchd configuration files are in plist format and found in
~/Library/LaunchAgents
– agents for the current user account only
/Library/LaunchAgents
and /Library/LaunchDaemons
– agents and daemons for all user accounts
/System/Library/LaunchAgents
and /System/Library/LaunchDaemons
– system level agents and daemons
and are usually named in reverse domain notation (tld.domain.process.plist
). Depending if the user account of server
is yours or not (can’t say, as you have blanked it), you should look in one of the first two locations above for a likely plist (if you have Xcode installed, you can QuickLook them easily). If found, your server
is indeed controlled by launchd. The correct procedure to stop it is to remove it from launchd’s process list through
launchctl unload <tld.domain.process>
which will unload and stop the process (note you omit the plist
suffix).
There is also a GUI for handling launchd files, Peter Borg’s Lingon (make sure to get “Lingon”, not “Lingon 3”, which is a dumbed down version safe for vanilla use), which might be more convenient than manually rooting through the file locations.
NOTE: This is only a partial answer, so any other info as to why this happened could be good for others with this problem.
Literally, upon simply plugging in the power cord, all symptoms immediately stopped. (Battery was well above 10%.)
- CPU usage dropped to normal levels.
- Resulting sluggishness stopped as well.
Best Answer
MacVim forks (spawns a new process) to launch external processes, but it waits for the external process to return before resuming execution. Thus, killing MacVim simply detaches the child process (your program) from MacVim and attaches it to the main process running, in essence, OS X on the whole.
You have to quit, or Force Quit, your program explicitly in order to kill it.
It's also very likely that if you kill your program, and NOT MacVim, you can continue using MacVim without issue.