D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Strange network / perl problem



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 08 July 2002 2:59 pm, Steve Marvell wrote:
On Mon, Jul 08, 2002 at 02:34:18PM +0100, Theo Zourzouvillys wrote:
server writing faster than client could read?

doh, yup - that one :p

Surely the server blocks until the client's buffer is not full.

it should be, but...

you get a pIPE when the connection is closed, whatever
cuircumstances, iirc.

That's just not true, I'm afraid.

sorry, my bad, i'm in cookoo land today.

according so POSIX:

This signal is generatred when a process writes to a socket when the other end 
has terminated.

intereestying, as i never write to the socket on the client end.

IT's to insicate to the process that tehre is activity on the socket and
it needs to do something.

Nah, you can select() on the socket (and others) to get that kind of
information.  There is no need to jump out of your code for that.

as i said, cookoo land :p

*snip*

It would be a waste of tome keep catting and making logs, since
they are going nowhere. This is why the default action for SIGPIPE is
exit, since in the general case, it means the reciever of your data
has lost interest in you and you should stop trying to talk to it.

yeah, i guess. I don't generally write that many command line programms, most 
the stuff I write uses sockets, so i never really thought of it that way ;)

There  should probablt be a different signal for a transport endpoint hangup 
on a socket, but what can we do about it now  ;)


Anyway ...

If you are getting is sigpipe, its cos your writing to a file handle
that's got nowt on the other end.

now it starts to make sense.

after i have read all the data, i'm callign sock->close().  i'm betting that 
that is causing the SIGPIPE.


So, what's getting the sigpipe, the client or the server?

client is.

~ Theo

- -- 

Theo Zourzouvillys
http://zozo.org.uk/

Q:      What does a WASP Mom make for dinner?
A:      A crisp salad, a hearty soup, a lovely entree, followed by
       a delicious dessert.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9KaE0448CrwpTn6YRAiZUAKCVTQMzo0EnY7Tqq8CpuVsf4zx4QQCcDgu7
oZZMKMfqSrDELraXtcTfGL4=
=diyb
-----END PGP SIGNATURE-----


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly