HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Debugging a child process created using vfork() an...
Operating System - OpenVMS
1831985
Members
3993
Online
110034
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-09-2008 06:59 PM
01-09-2008 06:59 PM
Debugging a child process created using vfork() and execv()
Can a child process created using calls to vfork() and execv() be debugged via VMS debugger? I have tried depositing the debug image in execv call.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2008 08:26 PM
01-09-2008 08:26 PM
Re: Debugging a child process created using vfork() and execv()
Shreesha,
Yes, it should be possible. You need to make sure DBG$INPUT and DBG$OUTPUT point somewhere sensible.
If you have an X-Server you should be able to direct DBG$DECW$DISPLAY to a valid display, which should then fire up the DECwindows debugger on your X-server when the image is activated. Probably the easiest mechanism is to define a group logical name. For example:
$ SET DISPLAY/CREATE/NODE=xserver/TRANSPORT=tcpip
$ DEFINE/GROUP DBG$DECW$DISPLAY 'F$TRNLNM("DECW$DISPLAY")'
$ RUN yourprogram
If you don't have an X server, get yourself two terminal windows. Find the name of one terminal (assume TNA123:) and issue a "WAIT 10" command to make the owner process dormant for a while. Now from the other terminal:
$ DEFINE/GROUP DBG$INPUT TNA123:
$ DEFINE/GROUP DBG$OUTPUT TNA123:
$ SET PROCESS/PRIV=SHARE
$ RUN your-program
When the subprocess starts an image linked /DEBUG, it should talk to the dormant terminal. Note you need SHARE privilege, and you need to be careful if you have multiple subprocesses as they will all try to use the same terminal for debugger input and output.
Don't forget to DEASSIGN the group logical names.
yet another possibility... use the "kept" debugger and CONNECT to your child process.
Run your program and let the subprocess start.
From another terminal:
$ DEBUG/KEEP
DBG> CONNECT childprocess
This may need some code to make the child wait to be debugged. See debugger manual for more detail.
Yes, it should be possible. You need to make sure DBG$INPUT and DBG$OUTPUT point somewhere sensible.
If you have an X-Server you should be able to direct DBG$DECW$DISPLAY to a valid display, which should then fire up the DECwindows debugger on your X-server when the image is activated. Probably the easiest mechanism is to define a group logical name. For example:
$ SET DISPLAY/CREATE/NODE=xserver/TRANSPORT=tcpip
$ DEFINE/GROUP DBG$DECW$DISPLAY 'F$TRNLNM("DECW$DISPLAY")'
$ RUN yourprogram
If you don't have an X server, get yourself two terminal windows. Find the name of one terminal (assume TNA123:) and issue a "WAIT 10" command to make the owner process dormant for a while. Now from the other terminal:
$ DEFINE/GROUP DBG$INPUT TNA123:
$ DEFINE/GROUP DBG$OUTPUT TNA123:
$ SET PROCESS/PRIV=SHARE
$ RUN your-program
When the subprocess starts an image linked /DEBUG, it should talk to the dormant terminal. Note you need SHARE privilege, and you need to be careful if you have multiple subprocesses as they will all try to use the same terminal for debugger input and output.
Don't forget to DEASSIGN the group logical names.
yet another possibility... use the "kept" debugger and CONNECT to your child process.
Run your program and let the subprocess start.
From another terminal:
$ DEBUG/KEEP
DBG> CONNECT childprocess
This may need some code to make the child wait to be debugged. See debugger manual for more detail.
A crucible of informative mistakes
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP