[hackers] [quark] Don't warn on cleanup unlink error || Quentin Rameau

From: <git_AT_suckless.org>
Date: Mon, 24 Jul 2017 16:49:37 +0200 (CEST)

commit 1a0eca12a5b49a1eee22d0f7fcb7f03345d91e2b
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon Jul 24 00:56:43 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Mon Jul 24 16:49:24 2017 +0200

    Don't warn on cleanup unlink error
    
    We may catch an exit signal before we actually bound to the socket.

diff --git a/quark.c b/quark.c
index 9f91f45..48f52c3 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -894,9 +894,8 @@ static void
 cleanup(void)
 {
        close(insock);
- if (udsname) {
- if (unlink(udsname) < 0)
- fprintf(stderr, "unlink: %s\n", strerror(errno));
+ if (udsname)
+ unlink(udsname);
 }
 
 static void
Received on Mon Jul 24 2017 - 16:49:37 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 24 2017 - 17:04:01 CEST