- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Passing socket/file descriptors between proces...
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
тАО03-03-2005 03:56 AM
тАО03-03-2005 03:56 AM
Passing socket/file descriptors between processes?
Can I pass a socket descriptor from a parent process to a child process on VMS? By "passing a descriptor descriptor" I mean actually passing the ownership of the socket from one process to another - a little more that writing a 4 byte integer down a pipe.
Traditionally BSD and and SysV employ different approaches of achieving this, but both of them rely on a pipe between the two processes.
Does anyone know if the C RTL supports either mechanism, should I look into using the underlying system services, or give up altogether?
My thanks again for your headscratching,
M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2005 04:35 AM
тАО03-03-2005 04:35 AM
Re: Passing socket/file descriptors between processes?
does vfork do what you want?
See
http://h71000.www7.hp.com/commercial/c/docs/5763pro_047.html#index_x_1307
and
http://h71000.www7.hp.com/commercial/c/docs/5763pro_064.html#index_x_1727
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2005 05:21 AM
тАО03-03-2005 05:21 AM
Re: Passing socket/file descriptors between processes?
In this Ask the Wizard you have an example on how to pass a socket to a subprocess:
http://h71000.www7.hp.com/wizard/wiz_3995.html
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 01:36 AM
тАО03-04-2005 01:36 AM
Re: Passing socket/file descriptors between processes?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 01:53 AM
тАО03-04-2005 01:53 AM
Re: Passing socket/file descriptors between processes?
The example in the link in my previous post does yust that. Unfortunately it is writen in the $qio interface to sockets, which is more difficult to understand for an Unix guy.
In short:
The example (PARENT.C) listen for an incoming connection, when the connection is established creates a subprocess (CHILD.C) calling lib$spawn and pass the socket to it (using a mailbox). Then this subprocess comunicates with the client on that socket.
Probably the line
$DESCRIPTOR(command, "run serverc_qio2");
should be
$DESCRIPTOR(command, "run child");
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2005 07:31 PM
тАО04-01-2005 07:31 PM
Re: Passing socket/file descriptors between processes?
would make the trick ?
Philippe