nfy

Minimal and daemonless notification program for X
git clone git://git.margiolis.net/nfy.git
Log | Files | Refs | README | LICENSE

commit 58c35226d9aba9c8ccf5e59257851051fca7a459
parent aa787b489c6c40b38d6349eb5ff29c42231ce989
Author: Christos Margiolis <christos@margiolis.net>
Date:   Wed, 18 May 2022 10:39:25 +0300

change to O_WRONLY

Diffstat:
Mnfy.c | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/nfy.c b/nfy.c @@ -121,8 +121,8 @@ main(int argc, char *argv[]) if (setsid() < 0) err(1, "setsid"); - if ((lockfd = open(lockfile, O_CREAT | O_RDWR, 0600)) < 0) - err(1, "open"); + if ((lockfd = open(lockfile, O_CREAT | O_WRONLY, 0600)) < 0) + err(1, "open(%s)", lockfile); /* init x11 */ if (!(dpy = XOpenDisplay(NULL))) @@ -146,7 +146,6 @@ main(int argc, char *argv[]) th = font->ascent - font->descent; XftColorAllocName(dpy, vis, colormap, fontcolor, &color); - /* read stdin into buffer */ if ((lines = malloc(sizeof(struct line))) == NULL) err(1, "malloc");