import signal, ctypes, os
# @formatter:off - set sigterm handler for when parent dies
if os.path.exists("/lib/aarch64-linux-gnu/libc.so.6"): libc = ctypes.CDLL("/lib/aarch64-linux-gnu/libc.so.6")
else: libc = ctypes.CDLL("/lib/x86_64-linux-gnu/libc.so.6")
PR_SET_PDEATHSIG = 1; TERM = 15; libc.prctl(PR_SET_PDEATHSIG, TERM)
# @formatter:on
def term(signum, frame):
pass
signal.signal(signal.SIGTERM, term)
Related Posts
In this example, we’re going to configure Android device with BT to act as a Serial Port Profile Server, and Linux Phyton app as Serial Port Profile Client Android Somewhere withing MainActivity.kt file place this function, and then call it... Read more
Install build tools and dependencies and run compile job Read more
As I’m developing a Linux based SSH pkcs11 library which proxies key access to Bluetooth device, I had to troubleshoot many problems related to Bluetooth. Linux Bluetooth Stack The Linux user-space stack is hosted here: https://github.com/bluez/bluez.git You can pick a... Read more
I recently had a need to cross-compile a Rust binary for ARM64 architecture (Linux). This little code snippet describes how I did it with Alpine linux base image. Cross-RS Read more
JUnit Check For Cycles ArchUnit examples Read more
In order to invoke a JNI we need to create a Kotlin class with extrenal method and a C function with specific signature for each external method in Kotlin. Let’s assume that we have the following class in Kotlin: For... Read more
This document describes how to integrate Quarkus with Keycloak using OIDC protocol. It includes all required files and steps leading to working implementation. Starting local Keycloak Save this file as docker-compose.yaml and start it using docker-compose up -d command. Include... Read more
Mapping enum to string column Read more