- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: python
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 05:54 AM
тАО11-30-2007 05:54 AM
Thanks,
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 06:50 AM
тАО11-30-2007 06:50 AM
Re: python
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.
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.
(but if you are talking Detached Processes, THAT is quite another story).
hth
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 08:10 AM
тАО11-30-2007 08:10 AM
Re: python
ppid = os.getppid()
os.kill(ppid, signal.SIGKILL)
and I get a "function not implemented" - OpenVMS v7.3-2?
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?
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 09:14 AM
тАО11-30-2007 09:14 AM
Re: python
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.
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.
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.
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:
http://www.pi-net.dyndns.org/piforum/viewforum.php?f=4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 07:38 PM
тАО11-30-2007 07:38 PM
SolutionPython os.getppid and os.kill are just jacket routines to the corresponding C routine.
This is a VMS 7.3-2 problem which doesn't implement completely os.kill
The complete error return by os.kill is
OSError: [Errno 81] function not implemented
You can use the vms.starlet.delprc routines to kill the parent process and all it's subprocesses:
import os, vms.starlet
ppid = os.getppid()
vms.starlet.delprc(ppid)
As mentioned this only work if you use subprocesses and not detached processes.
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...
JF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2007 10:09 PM
тАО11-30-2007 10:09 PM
Re: python
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?
In that case, you can just SPAWN a little DCL that gets the master PID and stops it.
In quite other contexts, we do this (with a delay) for all batch procedures that sometimes exhibit indefinite waits to cause problems.
(eg, BACKUP to tapes behind a tape robot. We dislike a day without backup, but we HATE the various afterprocessings not being done!)
fwiw,
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-03-2007 09:13 AM
тАО12-03-2007 09:13 AM