<?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 Re: python in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082314#M38883</link>
    <description>JF's solution worked!  Thanks!</description>
    <pubDate>Mon, 03 Dec 2007 17:13:35 GMT</pubDate>
    <dc:creator>John Tannahill</dc:creator>
    <dc:date>2007-12-03T17:13:35Z</dc:date>
    <item>
      <title>python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082308#M38877</link>
      <description>Is there a safe way in Python for a child to issue a logout that logs itself and its parent out (i.e., no child zombie process left behind)?  When a process wants to log out, I want to do some general cleanup, etc. first in a child process and then log out both of them.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;John</description>
      <pubDate>Fri, 30 Nov 2007 13:54:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082308#M38877</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2007-11-30T13:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082309#M38878</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;in VMS, if a master process gets deleted, ALL its subprocesses (and subprocesses thereoff) are removed first. So, if a subprocess ("child" in Unix speak) stops its master PID process 9the "child" "kills" its "(great-)parent" ), it is IMPOSSIBLE to leave zombies.&lt;BR /&gt;That is mainly, because in VMS processes are not "killed", but they get (a rather severe) request to commit suicide. And as long as the process can do ANYTHING at all (and the requester has the rights to request it) the target process CLEANS UP and EXITs.&lt;BR /&gt;&lt;BR /&gt;(but if you are talking Detached Processes, THAT is quite another story).&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Fri, 30 Nov 2007 14:50:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082309#M38878</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2007-11-30T14:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082310#M38879</link>
      <description>I also have tried the following in the "child":&lt;BR /&gt;ppid = os.getppid()&lt;BR /&gt;os.kill(ppid, signal.SIGKILL)&lt;BR /&gt;and I get a "function not implemented" - OpenVMS v7.3-2?&lt;BR /&gt;&lt;BR /&gt;Is there another way to accomplish this in OpenVMS (my OpenVMS knowledge is quite limited)?  Something like this seems like it would vaporize the parent, and then hopefully the child would not a problem?&lt;BR /&gt;&lt;BR /&gt;John&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Nov 2007 16:10:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082310#M38879</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2007-11-30T16:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082311#M38880</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;This is not so much an OpenVMS question as a Python for OpenVMS question.  There are various ways to kill processes on VMS and various ways to ask them to kill themselves, but in a dynamic scripting language like Python, you're really at the mercy of the language implementation, which in turn may be at the mercy of the C run-time or other infrastructure.&lt;BR /&gt;&lt;BR /&gt;In your example, do we know which function is not implemented?  Is it getppid or kill?  I would suggest looking at the source of Python for OpenVMS and/or using whatever debugging capabilities Python has to see what those lines of Python translate to in terms of calls to the C library, etc.&lt;BR /&gt;&lt;BR /&gt;I would also suggest rethinking your architecture and seeing whether the parent can clean up the children rather than the other way around, but we don't have enough information to know how feasible that is.&lt;BR /&gt;&lt;BR /&gt;And finally (but probably the first thing you should do), consider posting to the Python for OpenVMS forum, where more specific expertise is likely available:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.pi-net.dyndns.org/piforum/viewforum.php?f=4" target="_blank"&gt;http://www.pi-net.dyndns.org/piforum/viewforum.php?f=4&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Nov 2007 17:14:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082311#M38880</guid>
      <dc:creator>Craig A Berry</dc:creator>
      <dc:date>2007-11-30T17:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082312#M38881</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;Python os.getppid and os.kill are just jacket routines to the corresponding C routine.&lt;BR /&gt;&lt;BR /&gt;This is a VMS 7.3-2 problem which doesn't implement completely os.kill&lt;BR /&gt;The complete error return by os.kill is&lt;BR /&gt;OSError: [Errno 81] function not implemented&lt;BR /&gt;&lt;BR /&gt;You can use the vms.starlet.delprc routines to kill the parent process and all it's subprocesses:&lt;BR /&gt;import os, vms.starlet&lt;BR /&gt;ppid = os.getppid()&lt;BR /&gt;vms.starlet.delprc(ppid)&lt;BR /&gt;&lt;BR /&gt;As mentioned this only work if you use subprocesses and not detached processes.&lt;BR /&gt;&lt;BR /&gt;Craig: Why a forum named OpenVMS, language and scripting whould be a incorrect place to post a  question on Python on OpenVMS (which is a scripting language on OpenVMS...)? There is much more readers of the ITRC forum than on the Python for OpenVMS forum...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Sat, 01 Dec 2007 03:38:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082312#M38881</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2007-12-01T03:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082313#M38882</link>
      <description>John,&lt;BR /&gt;&lt;BR /&gt;I know nothing about Python, (but i know Jean-FranÃ§ois is an expert), but does Python have the capability to SPAWN (like many other such products; under whatever name it is implemented) some native OS routine?&lt;BR /&gt;&lt;BR /&gt;In that case, you can just SPAWN a little DCL that gets the master PID and stops it.&lt;BR /&gt;&lt;BR /&gt;In quite other contexts, we do this (with a delay) for all batch procedures that sometimes exhibit indefinite waits to cause problems.&lt;BR /&gt;(eg, BACKUP to tapes behind a tape robot. We dislike a day without backup, but we HATE the various afterprocessings not being done!)&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Sat, 01 Dec 2007 06:09:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082313#M38882</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2007-12-01T06:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: python</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082314#M38883</link>
      <description>JF's solution worked!  Thanks!</description>
      <pubDate>Mon, 03 Dec 2007 17:13:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/python/m-p/5082314#M38883</guid>
      <dc:creator>John Tannahill</dc:creator>
      <dc:date>2007-12-03T17:13:35Z</dc:date>
    </item>
  </channel>
</rss>

