Skip to ContentSkip to Footer
Start of content
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- Networking
- >
- Re: Question about port hang
Networking
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
Go to solution
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
- Email to a Friend
- Report Inappropriate Content
10-06-2004 06:58 AM
10-06-2004 06:58 AM
My DBA has a program written in Perl that allows a machine to connect to port 9991. This program sits in a listen state until it gets a request. At the time someone telnets to this port a connection is established with a new forked process. When closing this connection the forked process is closed, you can't see it anymore with a ps -ef. But if you do a netstat -an |grep 9991 you can still see the connection in close_wait. The odd thing about this is if you were to do multiple telnets to 9991 and close each one they all close properly except for the first process that is closed. This one stays in a close_wait state. Any idea what could cause this???
Thanks,
Jason
Thanks,
Jason
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-06-2004 07:15 AM
10-06-2004 07:15 AM
Solution
Jason,
There is a ton of useless....um, I mean, useful information in this thread. Perhaps it will help you.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=671167
Dwyane :)
There is a ton of useless....um, I mean, useful information in this thread. Perhaps it will help you.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=671167
Dwyane :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-06-2004 07:35 AM
10-06-2004 07:35 AM
Re: Question about port hang
Tell your DBA to use shutdown() rather than close() on his sockets. I'll quote the perlfunc manpage under shutdown:
Quote -----------
shutdown(SOCKET,0); # stopped reading data
shutdown(SOCKET,1); # stopped writing data
shutdown(SOCKET,2); # stopping using this socket
This is useful with sockets when you want to tell the other side you're done writing but not done reading, or vice versa. It's also a more insistant form of close because it also disables the file descriptors in any forked copies in other processes.
------------- Endquote
The good news is that shudown() is also available as an IO::Socket method as well so
that $mysocket->shutdown(2); will work as well.
Quote -----------
shutdown(SOCKET,0); # stopped reading data
shutdown(SOCKET,1); # stopped writing data
shutdown(SOCKET,2); # stopping using this socket
This is useful with sockets when you want to tell the other side you're done writing but not done reading, or vice versa. It's also a more insistant form of close because it also disables the file descriptors in any forked copies in other processes.
------------- Endquote
The good news is that shudown() is also available as an IO::Socket method as well so
that $mysocket->shutdown(2); will work as well.
If it ain't broke, I can fix that.
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.
End of content
United States
Hewlett Packard Enterprise International
Communities
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP