<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Process created on persistant handler does not exit even after returning in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Process-created-on-persistant-handler-does-not-exit-even-after/m-p/410222#M4806</link>
    <description>&lt;P&gt;I have a persistant handler for REST calls which does a particular functionality using multi-threading until a flag value calls the process to stop (return).&lt;/P&gt;

&lt;P&gt;On ideal scenario, my process should exit with respective PID getting killed. However, the entry remains for a minute or two and during that time if the REST call to same handler is made, it runs with same PID which makes it complicated to know which is the actual process.&lt;/P&gt;

&lt;P&gt;Things gets complicated when same handler is called by different users on same machine. The os.getpid() method of python returns the first entry of PID for handler eventhough there are separate entries present.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;root     15144 28.7  7.4 515644 287464 ?       Sl   14:33   2:38 /opt/splunk/bin/python /opt/splunk/lib/python2.7/site-packages/splunk/persistconn/appserver.py&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;root     16272  8.3  0.6 147404 23820 ?        S    14:42   0:00 /opt/splunk/bin/python /opt/splunk/lib/python2.7/site-packages/splunk/persistconn/appserver.py&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;os.getpid() always returns me &lt;STRONG&gt;15144&lt;/STRONG&gt; and never &lt;STRONG&gt;16272&lt;/STRONG&gt;.&lt;BR /&gt;
Even after returning from REST call, the given entry for PID exists for some time.&lt;/P&gt;

&lt;P&gt;Is there an alternate way to gracefully handle this and exiting the process?&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jul 2019 09:37:45 GMT</pubDate>
    <dc:creator>rshah_splunk</dc:creator>
    <dc:date>2019-07-30T09:37:45Z</dc:date>
    <item>
      <title>Process created on persistant handler does not exit even after returning</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Process-created-on-persistant-handler-does-not-exit-even-after/m-p/410222#M4806</link>
      <description>&lt;P&gt;I have a persistant handler for REST calls which does a particular functionality using multi-threading until a flag value calls the process to stop (return).&lt;/P&gt;

&lt;P&gt;On ideal scenario, my process should exit with respective PID getting killed. However, the entry remains for a minute or two and during that time if the REST call to same handler is made, it runs with same PID which makes it complicated to know which is the actual process.&lt;/P&gt;

&lt;P&gt;Things gets complicated when same handler is called by different users on same machine. The os.getpid() method of python returns the first entry of PID for handler eventhough there are separate entries present.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;root     15144 28.7  7.4 515644 287464 ?       Sl   14:33   2:38 /opt/splunk/bin/python /opt/splunk/lib/python2.7/site-packages/splunk/persistconn/appserver.py&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;root     16272  8.3  0.6 147404 23820 ?        S    14:42   0:00 /opt/splunk/bin/python /opt/splunk/lib/python2.7/site-packages/splunk/persistconn/appserver.py&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;os.getpid() always returns me &lt;STRONG&gt;15144&lt;/STRONG&gt; and never &lt;STRONG&gt;16272&lt;/STRONG&gt;.&lt;BR /&gt;
Even after returning from REST call, the given entry for PID exists for some time.&lt;/P&gt;

&lt;P&gt;Is there an alternate way to gracefully handle this and exiting the process?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 09:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Process-created-on-persistant-handler-does-not-exit-even-after/m-p/410222#M4806</guid>
      <dc:creator>rshah_splunk</dc:creator>
      <dc:date>2019-07-30T09:37:45Z</dc:date>
    </item>
  </channel>
</rss>

