From ea30f2f61677f747bf4f970bf4bdf878f35ee061 Mon Sep 17 00:00:00 2001 From: Syd Logan Date: Tue, 4 Aug 2020 12:01:32 -0700 Subject: [PATCH] swss: gearsyncd should return 0 on exit (#1376) - changes made to supervisord conf require gearsyncd to return 0 otherwise restarts are performed, fail, and swss docker exits - originally, gearsyncd did not exit, and if it did, 1 exit code was returned to indicate failure. We converted this to do its job and exit, but did not correct the exit code. - prior state was not a problem until changes that are yet to merge for sonic-buildimage supervisord conf made returning a 1 problematic. Signed-off-by: syd.logan@broadcom.com --- gearsyncd/gearsyncd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gearsyncd/gearsyncd.cpp b/gearsyncd/gearsyncd.cpp index a447416da31b..f79b079d825e 100644 --- a/gearsyncd/gearsyncd.cpp +++ b/gearsyncd/gearsyncd.cpp @@ -67,7 +67,7 @@ int main(int argc, char **argv) break; case 'h': usage(); - return 1; + return EXIT_FAILURE; default: /* '?' */ usage(); return EXIT_FAILURE; @@ -105,7 +105,7 @@ int main(int argc, char **argv) cerr << "Exception \"" << e.what() << "\" had been thrown in gearsyncd daemon" << endl; return EXIT_FAILURE; } - return 1; + return EXIT_SUCCESS; } bool handleGearboxConfigFromConfigDB(ProducerStateTable &p, DBConnector &cfgDb, bool warm)