[Zope] popen2 in External method causes Aiieee!
Milos Prudek
milos.prudek@tiscali.cz
Fri, 05 Jul 2002 19:36:04 +0200
The following simple external method works fine in Python 2.1.3/Zope
2.5.1 locally, but does not work for files larger than 4000 bytes in the
exactly same software configuration on a remote server. The remote
server has a lot of free memory and disk space.
def filetype(File=''):
import os
cmd='file -b -'
w,r=os.popen2(cmd)
w.write(File)
w.close()
return r.read().strip()
This External method is called as follows from a Python Script:
Ft = context.filetype(text[:20000])
The Aiieee! error message is:
2002-07-05T17:26:27 ERROR(200) zdaemon zdaemon: Fri Jul 5 10:26:27
2002: Aiieee! 24523 exited with
error code: 13
------
2002-07-05T17:26:27 INFO(0) zdaemon zdaemon: Fri Jul 5 10:26:27 2002:
Houston, we have forked
------
2002-07-05T17:26:27 INFO(0) zdaemon zdaemon: Fri Jul 5 10:26:27 2002:
Houston, we have forked
------
2002-07-05T17:26:27 INFO(0) zdaemon zdaemon: Fri Jul 5 10:26:27 2002:
Hi, I just forked off a kid:
24638
I am perfectly sure that it is the extrernal method that is causing it.
When I removed the source code and put a simple "return 'GIF'" in the
External method, problem disappeared.
Why would it work on a local machine and not work on a remote hosting
server?
--
Milos Prudek