[rkward-cvs] SF.net SVN: rkward:[3894] trunk/rkward/rkward/rbackend

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Oct 6 15:45:17 UTC 2011


Revision: 3894
          http://rkward.svn.sourceforge.net/rkward/?rev=3894&view=rev
Author:   tfry
Date:     2011-10-06 15:45:17 +0000 (Thu, 06 Oct 2011)
Log Message:
-----------
Unfortunately, fork()s also occur on each popen (where they are harmless), so let's not be quite as verbose about it.

Modified Paths:
--------------
    trunk/rkward/rkward/rbackend/rinterface.cpp
    trunk/rkward/rkward/rbackend/rkrbackend.cpp

Modified: trunk/rkward/rkward/rbackend/rinterface.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rinterface.cpp	2011-10-06 15:22:56 UTC (rev 3893)
+++ trunk/rkward/rkward/rbackend/rinterface.cpp	2011-10-06 15:45:17 UTC (rev 3894)
@@ -513,9 +513,6 @@
 	} else if (call == "preLocaleChange") {
 		int res = KMessageBox::warningContinueCancel (0, i18n ("A command in the R backend is trying to change the character encoding. While RKWard offers support for this, and will try to adjust to the new locale, this operation may cause subtle bugs, if data windows are currently open. Also the feature is not well tested, yet, and it may be advisable to save your workspace before proceeding.\nIf you have any data editor opened, or in any doubt, it is recommended to close those first (this will probably be auto-detected in later versions of RKWard). In this case, please chose 'Cancel' now, then close the data windows, save, and retry."), i18n ("Locale change"));
 		if (res != KMessageBox::Continue) return (QStringList ("FALSE"));
-	} else if (call == "forkNotification") {
-		KMessageBox::information (0, i18n ("<p>A command running in the R backend has caused the R backend process to \"fork\". Typically this is done to spread computations onto several CPU cores. We try our best to support this in RKWard, despite some technical problems inherent in forking a multi-library, multi-threaded application. However, it is entirely possible that this causes trouble / broken features in some cases, particularly in combination with further R libraries. If you observe any such adverse effects after forking, please send us a bug report.</p>"
-		"<p>If you have a choice, consider using a different technique of parallelization, e.g. the 'PSOCK' method of R packages <i>snow</i> or <i>parallel</i>.</p>"), i18n ("Backend has forked"), "fork_notification");
 	} else if (call == "listPlugins") {
 		RK_ASSERT (calllist.count () == 1);
 		return RKComponentMap::getMap ()->allComponentIds ();

Modified: trunk/rkward/rkward/rbackend/rkrbackend.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkrbackend.cpp	2011-10-06 15:22:56 UTC (rev 3893)
+++ trunk/rkward/rkward/rbackend/rkrbackend.cpp	2011-10-06 15:45:17 UTC (rev 3894)
@@ -1058,14 +1058,14 @@
 
 	// Block SIGCLD in the main thread from now on. I don't fully understand, why, but otherwise, these signals
 	// interrupt the select() call in the fork()ing code of library(parallel)
-	// NOTE: If this turns out to be a problem, another try might be to add restarts to the SIGCLD handler, as
-	// suggested, here: https://bugreports.qt.nokia.com/browse/QTBUG-1787
 	sigset_t new_set;
 	sigemptyset (&new_set);
 	sigaddset (&new_set, SIGCLD);
 	pthread_sigmask (SIG_BLOCK, &new_set, NULL);
 
-	RKRBackend::this_pointer->handlePlainGenericRequest (QStringList ("forkNotification"), false);
+//	This was used to show a warning message. Unfortunately, however, forks also occur on every popen (i.e. in system(..., intern=TRUE).
+//	RKRBackend::this_pointer->handlePlainGenericRequest (QStringList ("forkNotification"), false);
+	RK_DO (qDebug ("Backend process forked (for the first time, this session)"), RBACKEND, DL_WARNING);
 }
 
 void completeForkChild () {

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