--- freem/src/fmadm.c 2025/04/03 01:41:02 1.29 +++ freem/src/fmadm.c 2025/04/03 20:48:14 1.30 @@ -1,5 +1,5 @@ /* - * $Id: fmadm.c,v 1.29 2025/04/03 01:41:02 snw Exp $ + * $Id: fmadm.c,v 1.30 2025/04/03 20:48:14 snw Exp $ * FreeM Administration Tool * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: fmadm.c,v $ + * Revision 1.30 2025/04/03 20:48:14 snw + * Improve daemon error diagnostics and bump to 0.63.0-rc3 + * * Revision 1.29 2025/04/03 01:41:02 snw * New features frozen; prepare 0.63.0-rc1 * @@ -1305,7 +1308,9 @@ int fm_daemonctl (short action, short ob char *savptr; int result; long epid; + int retval; + retval = 0; switch (action) { case ACT_START: @@ -1400,6 +1405,7 @@ int fm_daemonctl (short action, short ob } else { fprintf (stderr, "[FAIL]\n"); + retval++; } break; @@ -1411,10 +1417,12 @@ int fm_daemonctl (short action, short ob } else { fprintf (stderr, "[FAIL]\n"); + retval++; } } else { fprintf (stderr, "[FAIL]\n"); + retval++; } break; @@ -1435,7 +1443,7 @@ int fm_daemonctl (short action, short ob } while ((cur_env = strtok_r (NULL, ",", &savptr)) != NULL); free (envlist); - exit (0); + exit (retval); } /* fm_daemonctl() */