This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.spawnXX functions terminates process if second argument is empty list
Type: behavior Stage: resolved
Components: Windows Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: BTaskaya, SSchukat, pablogsal, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2013-09-05 10:52 by SSchukat, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg196988 - (view) Author: Stefan Schukat (SSchukat) Date: 2013-09-05 10:52
If os.spawnv or os.spawnve  is called with an empty second argument the process terminates in release builds under Windows. This is simple to reproduce:

>>> import os
>>> nPath = os.path.join(os.environ["windir"], "notepad.exe")
>>> os.spawnv(os.P_NOWAIT, nPath, []) # or os.spawnv(os.P_NOWAIT, nPath, [], {})

This has the same cause as the bug reported for execv http://bugs.python.org/issue1039 and could be fixed in the same way.
msg358715 - (view) Author: Batuhan Taskaya (BTaskaya) * (Python committer) Date: 2019-12-20 16:06
@SSchukat can you reproduce this issue in python 3?
msg359407 - (view) Author: Stefan Schukat (SSchukat) Date: 2020-01-06 08:23
@Batuhan the error does not appear anymore in at least Python 3.6.1
>>> import os
>>> nPath = os.path.join(os.environ["windir"], "notepad.exe")
>>> os.spawnv(os.P_NOWAIT, nPath, []) # or os.spawnv(os.P_NOWAIT, nPath, [], {})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: spawnv() arg 2 cannot be empty
msg359420 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-01-06 12:35
Closing as this also does not happen anymore on master as well.
History
Date User Action Args
2022-04-11 14:57:50adminsetgithub: 63130
2020-01-06 12:35:03pablogsalsetstatus: open -> closed

nosy: + pablogsal
messages: + msg359420

resolution: fixed
stage: resolved
2020-01-06 08:23:53SSchukatsetmessages: + msg359407
2019-12-20 16:06:27BTaskayasetnosy: + paul.moore, tim.golden, BTaskaya, zach.ware, steve.dower
messages: + msg358715

components: + Windows, - Interpreter Core
type: behavior
2013-09-05 10:52:34SSchukatcreate