Splunk Search

Decouple a process in windows

pratik97
Engager

So, I want to detach a process in windows using python code. What I want to do is, I am spawning a process from Splunk which calls some REST APIs and gets some data(scripted input). Now, when Splunk is stopped, I still want to collect the data. I tried to CreateProcess() with DETACH_PROCESS flag but it still kills the process whenever Splunk stops. I read about it and I assume that Splunk uses some mechanism like Job Objects or something that kills all the child processes. I want this process to not get terminated when its parent gets terminated. I want to remove all its references from Splunk process. I also tried creating more than one processes and exiting them to eliminate any reference Splunk keeps(something like double fork) in Linux but that didn't work. Splunk spawns a service under svchost. Is there any way we can forcefully detach a process from the parent process, so it survives the parent's death?

Tags (1)
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In January, the Splunk Threat Research Team had one release of new security content via the Splunk ES Content ...

Expert Tips from Splunk Professional Services, Ensuring Compliance, and More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Observability Release Update: AI Assistant, AppD + Observability Cloud Integrations & ...

This month’s releases across the Splunk Observability portfolio deliver earlier detection and faster ...