No server is not fatal, just NULL

This commit is contained in:
jun7 2018-06-07 14:29:52 +09:00
parent dd57dd303a
commit be03ed43bd
2 changed files with 3 additions and 3 deletions

View File

@ -412,7 +412,7 @@ static char *request(char *exe, Com type, bool caller, char *data)
if (caller)
g_mutex_lock(&cli->retm);
if (!ipcsend(exe, INPUT, type, caller ? cli->pid : NULL, data))
fatal(3); //spawning svr failse is fatal
P(Spawning %s failed !!, exe)
}
close(lock);
}

View File

@ -27,11 +27,11 @@ along with wyebrun. If not, see <http://www.gnu.org/licenses/>.
#define WYEBKEEPSEC 3
//client
//wyebrun spawns the exe if wyebsend failes
//wyebrun spawns the exe automatically
char *wyebget( char *exe, char *data); //don't free the ret val
void wyebsend(char *exe, char *data);
void wyebkeep(char *exe, int sec); //keep alive. default is 3s
//loop the wyebuntil. to stop, use g_source_remove
//loop the wyebkeep. to stop, use g_source_remove
guint wyebloop(char *exe, int sec);
//send stdin to svr and ret data to stdout
//blank and enter exit it