Re: select( ) call related

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sriram,
change code something like this

1.Declare two fdsets
2. After fd_set into one set copy the same to other set before the while loop
3.At the end of while loop ,use the second set to replace the set used in select call



enjoy Ravi

Sriram N.S. wrote:
hi,

Can anyone help me in solving the following issue.
I am using a select() call from within a while loop in which
i have to repeatedly read incoming messages on the same
socket.
I learnt that once the "select" call is executed, the fd-set
used with the call will be cleared automatically. I tried
making a local copy of the the fd-set using bcopy/memcpy
(for every iteration) before invoking the call, but am
unable to make a consistent copy of the fd-set [i.e.,
sometimes it gets copied and sometimes not]. Is there any other way of preserving the fd-set value even
after the select() call??


--Sriram.
__________________________________
Sign up for your free netster.com email account today!
http://mail.netster.com
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/




--


The views presented in this mail are completely mine. The company is not responsible for whatsoever. ------------------------------------------------------------------------ Ravi Kumar CH Rendezvous On Chip (i) Pvt Ltd Hyderabad, India Ph: +91-40-2335 1214 / 1175 / 1184

ROC home page <http://www.roc.co.in>



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux