From maechler at stat.math.ethz.ch  Wed Mar 22 11:10:07 2017
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Wed, 22 Mar 2017 11:10:07 +0100
Subject: [Rd] IO error when writing to disk
In-Reply-To: <CAPXDfF=suW3S-Bd8sZqTaqkpGT3-OJ2T2pHhUsNKpE+U2+cbqg@mail.gmail.com>
References: <CAPXDfFnF8iSSoDJHtUy0Wm=0PqwtzysLRG0KU_pqCVAO6AoqcA@mail.gmail.com>
	<CAPXDfF=suW3S-Bd8sZqTaqkpGT3-OJ2T2pHhUsNKpE+U2+cbqg@mail.gmail.com>
Message-ID: <22738.19839.477561.237@stat.math.ethz.ch>

>>>>> realitix  <realitix at gmail.com>
>>>>>     on Wed, 22 Mar 2017 10:17:54 +0100 writes:

    > Hello,
    > I have sent a mail but I got no answer.

All work here happens on a volunteer basis... and it seems
everybody was busy or not interested.

    > Can you create a bugzilla account for me.

I've done that now.

Note that your prposed patch did contain a bit too many "copy &
paste" repetitions...  which I personally would have liked to be
written differently, using a wrapper (function or macro).

Also, let's assume on Linux, would there be a way to create a
small, say 1 MB, temporary file system as a non-root user?
In that case, we could do all the testing from inside R ..

Best,
Martin Maechler

    > Thanks,
    > Jean-S?bastien Bevilacqua

    > 2017-03-20 10:24 GMT+01:00 realitix <realitix at gmail.com>:

    >> Hello,
    >> Here a small improvement for R.
    >> 
    >> When you use the function write.table, if the disk is full for example,
    >> the function doesn't return an error and the file is written but truncated.
    >> 
    >> It can be a source of mistakes because you can then copy the output file
    >> and think everything is ok.
    >> 
    >> How to reproduce
    >> -------------------------
    >> 
    >> >> write.csv(1:10000000, 'path')
    >> 
    >> You must have a path with a small amount of disk available (on linux:
    >> http://souptonuts.sourceforge.net/quota_tutorial.html)
    >> 
    >> I have joined the patch in this email.
    >> Can you open a bugzilla account for me to keep track of this change.
    >> 
    >> Thanks,
    >> Jean-S?bastien Bevilacqua
    >> 

    > [[alternative HTML version deleted]]

    > ______________________________________________
    > R-devel at r-project.org mailing list
    > https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] IO error when writing to disk
Martin Maechler