[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Re: exit() on low diskspace
From:       Don Sanders <sanders () kde ! org>
Date:       2001-08-01 13:14:56
[Download RAW message or body]

On Tuesday 31 July 2001 16:30, Carsten Pfeiffer wrote:
> On Tue, Jul 31, 2001 at 02:01:31PM +0200, Don Sanders 
wrote:
> > Hmm. Well saving the message could be a problem if
> > there is no free disk space.
>
> It could try to save in /tmp or simply try to deliver the
> mail. I use a local sendmail, so this is not about
> launching some smtp slave and contacting a remote host,
> which could take some time.

I can't think of a reason why you would want it to send an 
unfinished mail.

Saving in tmp is an idea, another alternative is to 
create a, say, 100kb file at startup, then if disk space is 
exhausted erase that file and call kernel->dumpDeadLetters.

>
> > It's better to prevent out of memory and out of disk
> > space errors rather than try to deal with them
> > elegantly if they occur.
>
> I disagree. A program has to be failsafe. 

Realistically a program can't ever be completely failsafe, 
it's difficult to keep on trucking in the event that a 
physical device such a ram chip or hard drive fails.

In the specific case of disk space being exhausted I think 
the first priority is to not lose or corrupt the users 
data. Second priority is to inform the user what has 
happened. Third priority is to recover gracefully.

> If it can't
> write to the disk, because it is full -- don't write! It
> could tell me to clean up some diskspace and then write.
> Disable the entire GUI if necessary, stop all slaves and
> timers and show a "You're low on diskspace on
> /home/foo/..., please free some space to let kmail
> continue" dialog.

Previously I tried to disable the GUI by showing a please 
free up some diskspace KMessageBox, this worked fine for a 
while, but then something changed (I don't know what) and 
people started losing mail when the KMessageBox was shown 
(it no longer completely blocked the application).

Losing mail is a big deal, I'm now only interested in 
solutions that consist of showing the message box in a 
different process from the KMail one.

> > No, no luck. Which I am not pleased about, the showing
> > of the message should be simple on the KMail side. I
> > want to know exactly what happens in between the time I
> > call a show message in different process function and
> > the time that the new process is started.
>
> Did you have a look at kdecore/tests/knotifytest.cpp?
> It's as easy as it can get and it works for me. And note
> that the knotify daemon should already be running, so no
> need to start it.

That test doesn't work here. What is the knotify daemon 
called?

Don.
_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic