Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Luciano Rocha <strange@xxxxxxxxxxxxx>
- Date: Fri, 12 Oct 2007 11:16:36 +0100
On Fri, Oct 12, 2007 at 10:52:01AM +0100, Howard Wilkinson wrote:
Stephen Croll wrote:
Howard Wilkinson wrote:Thanks for that!
Can you suggest such a list - I can only find lists for POSIX threads!comp.unix.programmer
.....Code goes as followsI haven't really looked at the code, except for making mods to get it to
compile, but it works for me:
pika.localdomain:~/tmp 0:12> uname -a
Linux pika.localdomain 2.6.22.9-91.fc7 #1 SMP Thu Sep 27 20:47:39 EDT 2007
x86_64 x86_64 x86_64 GNU/Linux
--I obviously oversimplified the code - attached is my real test case .....
Steve Croll
server - Socket is ready to write
server - Socket is not ready to read
master - Socket is ready to write
master - Socket is ready to read
master - recv - Resource temporarily unavailable(11)
Hmmm!
Is there a reason for using SOCK_DGRAM instead of the usual SOCK_STREAM?
The latter will make the recv return 0, indicating the other end closed
the connection, as it did happen, as one peers exits before the other
select(2)s:
$ ./socketpair
server - Socket is ready to write
server - Socket is not ready to read
exited: 14520
master - Socket is ready to write
master - Socket is ready to read
master - recv - Resource temporarily unavailable(11)
This could be a bug, or standard behaviour for disconnected datagram
sockets (I don't know enough of the standards).
--
lfr
0/0
Attachment:
pgp0FHw38oGTq.pgp
Description: PGP signature
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
- Follow-Ups:
- References:
- Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Howard Wilkinson
- Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Gordon Messmer
- Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Howard Wilkinson
- Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Stephen Croll
- Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- From: Howard Wilkinson
- Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- Prev by Date: Re: Sandisk Sansa c250
- Next by Date: Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- Previous by thread: Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- Next by thread: Re: Problem with socketpair , AF_UNIX and select call - can anybody through any light on this!
- Index(es):
Relevant Pages
|