Skip to content

Commit

Permalink
Merge pull request #257 from FYP-Auto-Scale-JasmineGraph/fix-shutdown
Browse files Browse the repository at this point in the history
Fix shutdown command on workers
  • Loading branch information
miyurud authored Nov 5, 2024
2 parents 8c8eb3f + 1622820 commit 18dfd3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/JasmineGraphInstanceService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ limitations under the License.

#include "JasmineGraphInstanceService.h"

#include <signal.h>
#include <stdio.h>
#include <unistd.h>

Expand Down Expand Up @@ -1980,6 +1981,8 @@ static inline void close_command(int connFd, bool *loop_exit_p) {

static inline void shutdown_command(int connFd) {
close(connFd);
pid_t ppid = getppid();
kill(ppid, SIGTERM);
exit(0);
}

Expand Down

0 comments on commit 18dfd3e

Please sign in to comment.