HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Read(2) command going for infinite sleep
Operating System - HP-UX
1833867
Members
1969
Online
110063
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
06-29-2005 10:50 PM
06-29-2005 10:50 PM
Read(2) command going for infinite sleep
Hi All,
Our application is hanging because "read(2)" command is going for a infinite sleep.
Following is the "read" system call used by our application
read (accept_h, tmp, buffleft)
where accept_h - Socket File descriptor
tmp - Buffer of 102400 bytes
buffleft - 102400
Following is the output of the tusc tool
read(4, 0x40022630, 102400) ..................................................... [sleeping]
The above line indicates that read command is infinetly sleeping.
Please let me know when can a "read(2)" command go for a infinite sleep ? I have attached the tusc tool output for reference.
Thanks and Regards
Channabasappa Herur
Our application is hanging because "read(2)" command is going for a infinite sleep.
Following is the "read" system call used by our application
read (accept_h, tmp, buffleft)
where accept_h - Socket File descriptor
tmp - Buffer of 102400 bytes
buffleft - 102400
Following is the output of the tusc tool
read(4, 0x40022630, 102400) ..................................................... [sleeping]
The above line indicates that read command is infinetly sleeping.
Please let me know when can a "read(2)" command go for a infinite sleep ? I have attached the tusc tool output for reference.
Thanks and Regards
Channabasappa Herur
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2005 02:00 AM
06-30-2005 02:00 AM
Re: Read(2) command going for infinite sleep
Do a man 2 read and a man 2 accept -- that will really explain it. This is normal behavior when O_NONBLOCK is clear and no data are available. There are various means of handling this; among them are 1) use non-blocking i/o, 2) use a SIGALRM signal handler.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2005 05:12 AM
07-01-2005 05:12 AM
Re: Read(2) command going for infinite sleep
...or select(), or poll(), or eventports (man 7 poll)
Even if you "know" that the thing to which you have connected is going to send you data spontaneuously after you have connect()ed to it, there is no guarantee that data will actually reach you.
And while there are some servers that do emit data spontaneously, it is much more common that once you connect to them, you have to send them some sort of explicit request first.
Even if you "know" that the thing to which you have connected is going to send you data spontaneuously after you have connect()ed to it, there is no guarantee that data will actually reach you.
And while there are some servers that do emit data spontaneously, it is much more common that once you connect to them, you have to send them some sort of explicit request first.
there is no rest for the wicked yet the virtuous have no pillows
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