[rkward-cvs] SF.net SVN: rkward:[3523] trunk/rkward/rkward/rbackend/rkrbackend.cpp
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Apr 24 11:35:11 UTC 2011
Revision: 3523
http://rkward.svn.sourceforge.net/rkward/?rev=3523&view=rev
Author: tfry
Date: 2011-04-24 11:35:10 +0000 (Sun, 24 Apr 2011)
Log Message:
-----------
R's tcltk does not react well to receiving interrupt signals (also outside of RKWard), so let's not use these too much.
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rkrbackend.cpp
Modified: trunk/rkward/rkward/rbackend/rkrbackend.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkrbackend.cpp 2011-04-23 11:57:10 UTC (rev 3522)
+++ trunk/rkward/rkward/rbackend/rkrbackend.cpp 2011-04-24 11:35:10 UTC (rev 3523)
@@ -301,8 +301,7 @@
}
if (incomplete) RKRBackend::this_pointer->current_command->status |= RCommand::Failed | RCommand::ErrorIncomplete;
RKRBackend::repl_status.user_command_status = RKRBackend::RKReplStatus::ReplIterationKilled;
-#warning TODO: use Rf_error(""), instead?
- RK_doIntr (); // to discard the buffer
+ Rf_error (""); // to discard the buffer
} else {
RKTransmitNextUserCommandChunk (buf, buflen);
return 1;
@@ -333,7 +332,7 @@
// For safety, let's reset and start over.
RKRBackend::this_pointer->current_command->status |= RCommand::Failed | RCommand::ErrorOther;
RKRBackend::repl_status.user_command_status = RKRBackend::RKReplStatus::ReplIterationKilled;
- RK_doIntr (); // to discard the buffer
+ Rf_error(""); // to discard the buffer
} else {
// A call to readline(). Will be handled below
break;
@@ -364,8 +363,6 @@
RKRBackend::this_pointer->handleRequest (&request);
if (request.params["cancelled"].toBool ()) {
if (RKRBackend::this_pointer->current_command) RKRBackend::this_pointer->current_command->status |= RCommand::Canceled;
- RK_doIntr();
- // threoretically, the above should have got us out of the loop, but for good measure:
Rf_error ("cancelled");
RK_ASSERT (false); // should not reach this point.
}
@@ -804,7 +801,7 @@
RK_DO (qDebug ("interrupted"), RBACKEND, DL_DEBUG);
}
}
- } else {
+ } else if (RKRBackend::repl_status.user_command_status != RKRBackend::RKReplStatus::ReplIterationKilled) {
QString string = RKRSupport::SEXPToString (call);
RKRBackend::this_pointer->handleOutput (string, string.length (), ROutput::Error);
RK_DO (qDebug ("error '%s'", qPrintable (string)), RBACKEND, DL_DEBUG);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list