[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KNotify: Crash Prevention Fix
From: Waldo Bastian <bastian () kde ! org>
Date: 2000-09-23 0:48:08
[Download RAW message or body]
On Fri, 22 Sep 2000, Charles Samuels wrote:
> > The following patch prevents KNotify from buggin the user with KCrash, and
> most importantly, will allow knotify to work on a system without a
> functioning artsd.
I suggest not to use your config file for this since this increases the risk
of not working/corrupting it. Instead I would do something like:
close(creat("$HOME/.knotify-nosound));
E.g.:
buf[256];
const char *home = getenv("HOME");
if (!home) return;
if (strlen(home) > 256-20) return;
strcpy(buf, home);
strcat(buf, "/.knotify-nosound);
int fd = creat(buf, 0777);
if (fd >= 0) close(fd);
After all, you are crashing so it's a sort of a wonder if anything works at
all.
Cheers,
Waldo
--
KDE/Linux, you make the choice.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic