git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21797 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+        // Must be done before modules are initialized
+#if 0
         if( pipe(idleFds) != 0 )
             return false;
         if( pipe(idleFds) != 0 )
             return false;
+bool wxInitIdleFds()
+{
+    if( pipe(idleFds) != 0 )
+        return false;
+    return true;
+}
+
 bool wxAddIdleCallback()
 {
 bool wxAddIdleCallback()
 {
+    if (!wxInitIdleFds())
+        return false;
+    
     // install input handler for wxWakeUpIdle
     inputId = XtAppAddInput( (XtAppContext) wxTheApp->GetAppContext(),
                              idleFds[0],
     // install input handler for wxWakeUpIdle
     inputId = XtAppAddInput( (XtAppContext) wxTheApp->GetAppContext(),
                              idleFds[0],