Skip to content

Commit

Permalink
Kill main process of worker on shutdown command
Browse files Browse the repository at this point in the history
  • Loading branch information
thevindu-w committed Nov 5, 2024
1 parent 8c8eb3f commit 1622820
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);

Check warning on line 1985 in src/server/JasmineGraphInstanceService.cpp

View check run for this annotation

Codecov / codecov/patch

src/server/JasmineGraphInstanceService.cpp#L1984-L1985

Added lines #L1984 - L1985 were not covered by tests
exit(0);
}

Expand Down

0 comments on commit 1622820

Please sign in to comment.