On Sun, 24 May 2009, Elmar Stellnberger wrote:

 If I issue a 'cp -a' on one konsole and a 'killall -s SIGINT cp' on
another konsole cp -a will terminate just as if it had finished copying.

Not quite; the exit status passed to the calling process will show the signal used to terminate cp. This can in turn be used to diagnose a display any desired message, for example in bash:

$ PROMPT_COMMAND='[ $? -ne 0 ] && echo Command exited abnormally'
$ true
$ false
Command exited abnormally

Alternatively it would be possible to construct a signal-aware wrapper around cp and other interactive processes.

My regard would be to let it print something like 'copying interrupted'
(... and may be continued by issuing the same command once more).

As the tools already exist to build this feature it's not a good fit for adding to cp. The specific message regarding resumed copies would be highly dependent on the arguments to cp.


Cheers,
Phil


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to