"Socket" files?

Oliver Fromme olli at haluter.fromme.com
Tue Aug 24 15:07:19 CEST 2004


Paulo da Silva <psXdaXsilva at esotericax.ptx> wrote:
 > Irmen de Jong wrote:
 > > from socket import *
 > > sock=socket(AF_UNIX,SOCK_STREAM)
 > > sock.bind("/tmp/mysocket")
 > [...]
 > 
 > OK. It works! I'll use mkfifo for "fifo" type and this for
 > "socket" type.
 > BTW, don't I need to close "sock.close()"? I don't want to
 > do anything with the socket except keeping it on disk.

Uhm, are you sure you know what you're doing?  UNIX domain
sockets work very similar to Internet domain sockets, i.e.
they disappear when they're closed (or when your program
exits, in which case everything is closed implicitly).

Why exactly do you want to create one and keep it on disk
without doing anything with it?  That doesn't seem make any
sense at all.

Best regards
   Oliver

-- 
Oliver Fromme, Konrad-Celtis-Str. 72, 81369 Munich, Germany

``All that we see or seem is just a dream within a dream.''
(E. A. Poe)



More information about the Python-list mailing list