[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: KNotify: Crash Prevention Fix
From: Charles <charles () altair ! dhs ! org>
Date: 2000-09-23 1:14:01
[Download RAW message or body]
On Fri, 22 Sep 2000, Waldo Bastian wrote:
> 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:
True.
And will do. but yuck, stdlib syscalls for opening files ;)
>
> 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic