From 7b95d5b65e03c018078cf293f260e9d707de2a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Mon, 30 Jun 2014 15:02:00 +0200 Subject: [PATCH] Only list sockets in session list --- abduco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abduco.c b/abduco.c index a647814..fd64549 100644 --- a/abduco.c +++ b/abduco.c @@ -447,7 +447,7 @@ static int list_session() { puts("Active sessions"); while (n--) { struct stat sb; char buf[255]; - if (stat(namelist[n]->d_name, &sb) == 0) { + if (stat(namelist[n]->d_name, &sb) == 0 && S_ISSOCK(sb.st_mode)) { strftime(buf, sizeof(buf), "%a%t %F %T", localtime(&sb.st_atime)); char status = ' '; if (sb.st_mode & S_IXUSR)