[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-05-05 Thread dellair jie

dellair jie added the comment:

Eric,

Very much appreciated for your offer to help.
This issue is with Cygwin fork(), documented here:
http://cygwin.com/faq.html#faq.using.fixing-fork-failures

I am closing the issue.
Have a great day!

--
resolution:  - not a bug
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21392
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread dellair jie

New submission from dellair jie:

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

--
messages: 217585
nosy: dellair.jie
priority: normal
severity: normal
status: open
title: Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource 
temporarily unavailable
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21392
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread dellair jie

Changes by dellair jie dell...@gmail.com:


--
components: +IO
type:  - resource usage

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21392
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread Eric V. Smith

Eric V. Smith added the comment:

Can you provide a working example? How are you calling execute()? What are 
__signal and __signalList set to?

Note that the default of None for cmd can't ever work, due to calling 
re.match (\s, cmd).

--
nosy: +eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21392
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread dellair jie

dellair jie added the comment:

The value of __signal and __signalList:
__signal=0
__signalList=[None] * 256
__signalList[signal.SIGHUP] = signalHandler
__signalList[signal.SIGQUIT] = signalHandler
__signalList[signal.SIGUSR1] = signalHandler
__signalList[signal.SIGUSR2] = signalHandler

signal.signal (signal.SIGHUP,  signalHandler)
signal.signal (signal.SIGQUIT, signalHandler)
signal.signal (signal.SIGUSR2, signalHandler)
signal.signal (signal.SIGUSR1, signalHandler)

I think those are irrelevant though.

cmd is a command and that is working.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21392
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21392] Python on Cygwin: subprocess.call BlockingIOError: [Errno 11] Resource temporarily unavailable

2014-04-30 Thread Eric V. Smith

Eric V. Smith added the comment:

I'd like to help with this, but unless you can provide a script I can run that 
shows the problem, I can't. I don't have the time to figure out what parameters 
I need to pass in to cause the problem. Sorry.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21392
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com