How to tell if a file is actually a socket?

Seth Hoenig seth.a.hoenig at gmail.com
Sun Aug 29 09:30:59 PDT 2010


I have a program which does a bit of scanning through files, and right now
I'm running into issues where std.File.isfile() is reporting sockets as
files, which is problematic, because sockets cause segfaults when I try to
read them.

This is the output of ls -lha on the directory with the socket:

srwxr-xr-x  1 seth seth    0 2010-08-09 20:54 SingletonSocket


So how can I detect if a file is actually a socket?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20100829/7445af15/attachment.html>


More information about the Digitalmars-d-learn mailing list