code: function receiveFromUi(message) {
  	var ok
  
  	if (message.getMap) {
  		sendMap()
  		ok = true
  	}
  	if (message.app) {
  		var appState = appMap[message.app]
  		if (message.launch) {
  			var newAppState = launchApp(message.app, appState, message.launch, message.debug)
  			if (newAppState != appState) appMap[message.app] = appState = newAppState
  			ok = true
  		}
  		if (appState) { // allow kill and del only if the app ever launched
  			if (message.kill) {
  				var fn = appState.killMap[appState.pid]
  				if (fn) {
  					fn()
  					ok = true
  				} else if (appState.state == 'crash') {
  					appState.state = 'stop'
  					sendToUi({app: appState.app, state: appState.state})
  					ok = true
  				}
  			}
  			if (message.del) {
  				if (appState.state == 'debug' || appState.state == 'run') {
  					for (var aPid in appState.killMap) appState.killMap[aPid]()
  				}
  				delete appMap[message.app]
  				ok = true
  			}
  		}
  	}
  	if (!ok) sendToUi({error: 'failed', message: message})
  }
docs: /*
  Receive a command from the ui
  
  message: object
  .app: string: the app identifier the message pertains to
  (.launch array of string: command and arguments)
  (.debug: boolean: true if launch to debug mode)
  (.kill: boolean: true to kill the child process)
  (.getMap: boolean: true to send process map to ui)
  (.del boolean: true to delete an app from procMap)