[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp/mv/dd to handle SIGXFSZ?

From: Micah Cowan
Subject: cp/mv/dd to handle SIGXFSZ?
Date: Mon, 09 Apr 2007 11:33:57 -0700
User-agent: Thunderbird (X11/20070306)

In the Ubuntu bugtracker, Malone, we've been getting several submissions of an issue, usually phrased along the lines of "cp dumps core on copy of > 4GB file to vfat (or usb)", etc. See https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/75574

I'd like to see a handler installed for SIGXFSZ in cp, mv and dd, so that a user-friendly warning can be issued instead of a core-dump, and processing of any remaining source files may continue unabated.

As you will see in the comments of the bug whose link I gave above, I'm aware that this will break POSIX (which specifies default handling for signals in the various utils), but I feel the utility of handling this signal would outweigh the benefits of strict adherence to the standard (which of course, could be re-enabled via POSIXLY_CORRECT).

As a secondary note, some users are disgruntled that cp will go ahead and copy 4GB of data before it realizes there is a problem, and would prefer a preemptive check to see what the maximum file size is. I absolutely understand that such a thing would not be preferable as default behavior, as it would break portability too much. And, I don't even know whether determining such a thing is possible (if so, it's probably not portable). But I'd like to know (a) if it is in fact possible, and (b) if possible, what is the feasibility of adding a suitable option to enable such a check?

Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]