recvmsg01: fix select() nfds for UNIX socket
PATCH 1/1 recvmsg01: fix select() nfds for UNIX socket
commit 7855d094bbeb9b8ce43dd698ec82e400eb91e709 did this for accept() on INET socket, but missed UNIX one.
Signed-off-by Jan Stancek <[email protected]>
--- testcases/kernel/syscalls/recvmsg/recvmsg01.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
testcases/kernel/syscalls/recvmsg/recvmsg01.c +3 -1
@@ -480,8 +480,10 @@ void do_child(void) fromlen =sizeof (fsun); newfd =accept (ufd, (struct sockaddr *)&fsun, &fromlen); -if (newfd >=0 ) +if (newfd >=0 ) {FD_SET (newfd, &afds); + nfds =MAX (nfds, newfd +1 ); + } }for (fd =0 ; fd < nfds; ++fd)if (fd != sfd && fd != ufd &&FD_ISSET (fd, &rfds)) {
Signature · 13 lines
1.7.1 ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 2 lines
commit
7855d094bbeb9b8ce43dd698ec82e400eb91e709did this foraccept()on INET socket, but missed UNIX one.
Good catch, acked.
Please push this ASAP.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. http://p.sf.net/sfu/gigenet _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list