Clixon_backend now returns -1/255 on error instead of 0

This commit is contained in:
Olof Hagsand 2017-12-12 22:40:28 +01:00
parent dd7f790193
commit ca16007b66
2 changed files with 7 additions and 2 deletions

View file

@ -642,6 +642,7 @@ startup_mode_startup(clicon_handle h,
int
main(int argc, char **argv)
{
int retval = -1;
char c;
int zap;
int foreground;
@ -965,9 +966,10 @@ main(int argc, char **argv)
if (event_loop() < 0)
goto done;
retval = 0;
done:
clicon_log(LOG_NOTICE, "%s: %u Terminated", __PROGRAM__, getpid());
clicon_log(LOG_NOTICE, "%s: %u Terminated retval:%d", __PROGRAM__, getpid(), retval);
backend_terminate(h); /* Cannot use h after this */
return 0;
return retval;
}