Python script wrapper is unkillable and I would like to kill it

I’m trying to have a custom notification server, and I based it off someone else’s python script. I then created a custom package so that it would be available system-wide, and then told qtile to open it as a subprocess. When checking the process tree in htop, I have 2 python3 {.filename}-wrapped processes, one the child of the other. When I send a SIGKILL to the parent -wrapped process, the child process does get killed, but the parent is still alive. If I send another SIGKILL to the parent, it also stays alive.

The custom package is this one (Should probably mention I am still pretty new with NixOS and nix in general, so it’s probably not high quality or anything):

{lib, pkgs, python311Packages } :

# Technically, I should be using buildPythonPackage or buildPythonApplication, but I don't want to setup the required file to make a pip package, soo....

pkgs.stdenv.mkDerivation rec {
	pname = "customnotif";
	version = "0.4";
	format = "other";
	src = ./.;

	propagatedBuildInputs = [
		(pkgs.python311.withPackages (pythonPackages: with pythonPackages; [
	buildInputs = [
	nativeBuildInputs = [

	dontUnpack = true;
	installPhase = ''
	install -Dm755 ${./} $out/bin/n-customnotif

Also, attempting to kill the subprocess.Popen() inside of a qtile hook doesn’t work, and killing qtile will simply orphan? the process, but I feel like figuring out why the parent python wrapper is unkillable should be a good step towards being able to kill it with a qtile hook, so I would like to focus on that first

Ok, I actually figured it out thanks to someone in the NixOS matrix, but it wasn’t related to Nix or NixOS at all. The 2 processes were how htop was displaying threads, while the unkillable part was because I didn’t know what a zombie process was.