When I run the gdb test suite, I see files like this in /tmp: srwxr-xr-x. 1 tromey tromey 0 May 17 07:27 gdb_ust11542= I think this comes from gdbserver's gdb_agent_socket_init. As far as I can see, there is no code to unlink the socket after gdbserver is done with it. I think there should be.
I'll have a look.
CVSROOT: /cvs/src Module name: src Changes by: qiyao@sourceware.org 2012-07-27 08:09:14 Modified files: gdb/doc : ChangeLog gdb.texinfo gdb/gdbserver : ChangeLog server.h target.c target.h tracepoint.c gdb/testsuite : ChangeLog gdb/testsuite/gdb.trace: strace.exp Log message: gdb/gdbserver/ PR remote/14161. * server.h: Declare gdb_agent_about_to_close. * target.c (kill_inferior): Include "agent.h". New. Send command 'kill'. * target.h (kill_inferior): Removed macro. * tracepoint.c (gdb_agent_about_to_close): New. (gdb_agent_helper_thread): Handle command 'close'. Wait endlessly until the inferior stops. Install gdb_agent_remove_socket to atexit hook. (agent_socket_name): New static variable. (gdb_agent_socket_init): Replace local variable 'name' with 'agent_socket_name'. (gdb_agent_remove_socket): New. gdb/doc/ * gdb.texinfo (IPA Protocol Commands): Document new command 'close'. gdb/testsuite/ KFAIL for PR remote/14161. * gdb.trace/strace.exp (strace_remove_socket): kfail for native. Cleanup socket files. (strace_info_marker): Detach inferior. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/ChangeLog.diff?cvsroot=src&r1=1.1348&r2=1.1349 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/doc/gdb.texinfo.diff?cvsroot=src&r1=1.992&r2=1.993 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/ChangeLog.diff?cvsroot=src&r1=1.633&r2=1.634 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/server.h.diff?cvsroot=src&r1=1.97&r2=1.98 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/target.c.diff?cvsroot=src&r1=1.25&r2=1.26 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/target.h.diff?cvsroot=src&r1=1.64&r2=1.65 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/gdbserver/tracepoint.c.diff?cvsroot=src&r1=1.62&r2=1.63 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3307&r2=1.3308 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.trace/strace.exp.diff?cvsroot=src&r1=1.13&r2=1.14
Sounds like this was fixed some time ago.