Folks,
I am running Python 3.4 on Cygwin 1.7.17 on Windows 2008.
The constant error I get is:
Traceback (most recent call last):
File "M:/sb3_ljie/bce/cmTools/lib/CC.py", line 321, in standAlone
results = Process.execute (cmd = cmd, opts = opts)
File "M:/sb3_ljie/bce/cmTools/lib/Process.py", line 327, in execute
timeout = timeout)
File "/usr/local/lib/python3.4/subprocess.py", line 535, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/local/lib/python3.4/subprocess.py", line 848, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.4/subprocess.py", line 1379, in _execute_child
restore_signals, start_new_session, preexec_fn)
BlockingIOError: [Errno 11] Resource temporarily unavailable
Python script is invoked via socket (server runs Cygwin inetd).
While the script (snippet) Process.py is as below with relatively large data return:
import subprocess, os, tempfile, re
def execute (cmd = None,
opts = None,
log = None,
verify = False,
cmdlog = False,
audit = False,
logappend = False,
ignorestatus = False,
umask = None,
host = None,
interrupt = None,
timeout = None,
forceaudit = False):
global __signal
global __signalList
returnData = {"status": 0, "rawstatus": 0, "interrupt": 0,
"stdout": None, "stderr": None}
os.environ["ENV"] = ""
stdOutHandle, stdOut = tempfile.mkstemp (text = True)
stdErrHandle, stdErr = tempfile.mkstemp (text = True)
if re.match ("\s", cmd): cmd = "'" + cmd + "'"
cmd = [cmd]
opts = opts.split()
cmd.extend (opts)
if not verify:
if umask: originalUmask = os.umask (umask)
if interrupt:
for idex, item in enumerate (__signalList):
if item: signal.signal (idex, interrupt)
__signal = 0
returnData["rawstatus"] = subprocess.call (cmd, stdout = stdOutHandle,
stderr = stdErrHandle,
timeout = timeout)
returns = returnData["rawstatus"]
os.close (stdOutHandle)
os.close (stdErrHandle)
Br,
Dellair
|