abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 7b95d5b65e03c018078cf293f260e9d707de2a69
parent b8b76171e84bc1d7dd376408decb784a7dacface
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Mon, 30 Jun 2014 15:02:00 +0200

Only list sockets in session list

Diffstat:
abduco.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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)