- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: UDP AST and LIB$SPAWN Hibernate
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
тАО01-27-2008 04:09 PM
тАО01-27-2008 04:09 PM
Without a NOWAIT request the parent process goes into HIB state and no longer processes AST's (or at least no longer processes the UDP read event AST that's hooked to it).
Is there any way to process UDP AST's when a process is placed into HIB when executing a SPAWN request?
Alternatively I've explored creating a jacket routine (eg., MY_LIB$SPAWN) to check the flags arg and if NOWAIT is not requested, then set it and then do a SYS$WFLOR on the sub-process completion status. Then I could do a global string replace of all LIB$SPAWN requests with MY_LIB$SPAWN requests rather than have to add the code to the many calls and increase risk of the change.
I've explored using optional arguments in F90 but have not been successful to date. Is it possible to declare a jacket routine so that an F90 app could call MY_LIB$SPAWN routine with partial arguments eg LIB$SPAWN(CMD,,,,,C) and have the jacket then call the actual lib routine with the optional arguments? If so is there any example code (in F90 or C/C++) of how to do this?
Thanks in advance for any guidance you may be able to provide.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2008 04:23 PM
тАО01-27-2008 04:23 PM
Re: UDP AST and LIB$SPAWN Hibernate
I have not seen that term being used before.
How do you declare one? Show code?
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2008 06:59 PM
тАО01-27-2008 06:59 PM
Re: UDP AST and LIB$SPAWN Hibernate
status = sys$qio (EFN$C_ENF, /* event flag */
inet_channel, /* i/o channel */
IO$_READVBLK, /* i/o function code */
&iosb, /* i/o status block */
UDP_AST, /* ast service routine */
0, /* ast parameter */
read_buffer, /* p1 - buffer address */
read_size, /* p2 - buffer length */
&client_itemlst, /* p3 - remote socket name */
0, /* p4 */
0, /* p5 */
0 /* p6 */
);
...where the UDP_AST is the function to call when a read operation occurs.
Thanks,
-Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2008 07:36 PM
тАО01-27-2008 07:36 PM
SolutionThis behaviour is explicitly documented in the RTL LIB$ manual:
http://ftp.openvms.compaq.com/doc/82final/5932/5932pro_045.html#spawn
"Unless the NOWAIT flags bit is set, the caller's process is put into hibernation until the subprocess finishes. Because the caller's process hibernates in supervisor mode, any user-mode ASTs queued for delivery to the caller are not delivered until the caller reawakes."
So you'll have to use NOWAIT.
I wouldn't use WFLOR but $HIBER + AST + $WAKE. If the LIB$SPAWN caller passes an AST address, then it probably already uses NOWAIT. If not, just replace the AST address and later use DCLAST to activate it.
Writing a jacket isn't to hard and possibly the best for a single function.
Either as a single routine, or the whole RTL.
As a single routine, just create a module my_spawn.
Make it have an entrypoint LIB$SPAWN.
Take the call. Use LIB$FIS to find the recall McCoy, remembering the address for a next time. Didle the arguments and call teh real thing.
Link my_spawn as a shareable.
Put the shareable in the option file or automatic link path.
Or replace it all....
See John Gilling FAKE_RTL article:
http://h71000.www7.hp.com/openvms/journal/v7/faking_it_with_openvms_shareable_images.html
Or... just forbid the spawn in what apparently should be a controlled environment. Sounds like conflicting requirement. Too often a spawn is used as a quick&dirty solution where a straight calleable is available (convert, edit, sort, submit..). Of course there are many things which are not calleable though (CC, LINK, Application programs without API,...)
hth,
Hein van den Heuvel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2008 08:17 PM
тАО01-27-2008 08:17 PM
Re: UDP AST and LIB$SPAWN Hibernate
-Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 01:22 AM
тАО01-28-2008 01:22 AM
Re: UDP AST and LIB$SPAWN Hibernate
I think, as long as the F90 routine does not touch optional arguments, You can simply pass the formal arguments to the LIB$ routine without knowing their actual content.
But beware of the exception: in VMS F90 (and older F77 as well), arguments of type CHARACTER cannot be optional, even if they are not touched. Optional CHARACTER variables will access-violate already at routine entry. (At least up until Fortran V7.5, I doubt this restriction has changed in later versions).
As long as You don't need formal correctness (i.e. not writing INTERFACE for the routine, and do separate compilation), You could work around by faking the type of optional variable as e.g. INTEGER instead of CHARACTER.
If You have to acess the optional variable inside the F90 routine, then no way around, this will not work for character variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 04:36 AM
тАО01-28-2008 04:36 AM
Re: UDP AST and LIB$SPAWN Hibernate
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 03:14 PM
тАО01-28-2008 03:14 PM
Re: UDP AST and LIB$SPAWN Hibernate
If you're on the same node or in the same cluster, I'd suggest the use of locks in general (blocking-based doorbells, etc), but some details on what you're really up to (rather than the specific approach under consideration here) might help tailor an approach to the particular environment.
UDP is good for multicast updates and other such, where the contents of each arriving datagram entirely replaces the previous datagram. Where there are no dependencies and no sequences and no context.
The word "critical" isn't usually mixed together with UDP.
Stephen Hoffman
HoffmanLabs LLC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 06:16 PM
тАО01-28-2008 06:16 PM
Re: UDP AST and LIB$SPAWN Hibernate
Hoff - understood and agreed. The advantage of UDP in our use is that its lightweight in terms of implemenation, directory service and rights requirements such as many other IPC mechanisms require such as SCS and lock management. While the data in the tables queried are critical (essentially providing a PEEK facility) whether one packet is lost is not as the product support analyst can easily retry the request (an atypical event within our cluster over LAN).
Thanks to all who responded. I'm new to this forum but its been wonderful how many quick and insightful responses I got in such a short time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-28-2008 06:43 PM
тАО01-28-2008 06:43 PM