zapis do neotevreneho socketu
Karel Zak
zakkr na zf.jcu.cz
Středa Listopad 7 14:11:28 CET 2001
On Wed, Nov 07, 2001 at 02:08:27PM +0100, petr.adamek na antek.cz wrote:
> Nemam ted moznost vyzkouseni, proto se ptam zde:
> jak se spravne chova unixovy system s BSD-
> kompatibilnimi sockety, kdyz provedu write(2) na
> socket, ktery neni otevreny (tj. neprobehl
> accept(2)/connect(2), pripadne ani bind(2))? Ja
> bych cekal nejaky EBADF, ale HP-UX 10.20 mi
> tvrdosijne vraci EPIPE (a posila signal
> 13). Dela to spravne?
ERRORS
EBADF fd is not a valid file descriptor or is not open
for writing.
EPIPE fd is connected to a pipe or socket whose reading
end is closed. When this happens the writing pro
cess will receive a SIGPIPE signal; if it catches,
blocks or ignores this the error EPIPE is returned.
Ja myslim, ze je to jasne. Jste si jist, ze ten socket nikdy nebyl
zivy a ze nepisete do mrtveho socketu coz je neco jineho nez
neinicializovany? :-)
Karel
--
Karel Zak <zakkr na zf.jcu.cz>
http://home.zf.jcu.cz/~zakkr/
C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
Další informace o konferenci Linux