[Zope-CVS] CVS: Products/ExternalEditor - CHANGES.txt:1.2 zopeedit.py:1.3

Casey Duncan casey@zope.com
Fri, 17 May 2002 14:53:04 -0400


Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv7817

Modified Files:
	CHANGES.txt zopeedit.py 
Log Message:
fixed spurious "editor not launched" errors


=== Products/ExternalEditor/CHANGES.txt 1.1.1.1 => 1.2 ===
 
+        Eliminated spurious "Editor did not launch" errors on short sessions
+        os when other errors occurred.
+
     5/16/02 - 0.2 Release
     
         Fixed product uninstallation bug


=== Products/ExternalEditor/zopeedit.py 1.2 => 1.3 ===
             try:
                 exit_pid, exit_status = os.waitpid(pid, os.WNOHANG)
-                if not exit_pid: launched = 1
+                if exit_pid != pid: launched = 1
             except OSError:
                 exit_pid = pid
             
@@ -194,6 +194,7 @@
             if (exit_pid == pid or save_interval) \
                and fstat[stat.ST_MTIME] != last_fstat[stat.ST_MTIME]:
                 # File was modified
+                launched = 1 # handle very short editing sessions
                 self.saved = self.putChanges()
                 last_fstat = fstat