Kaydet (Commit) eccaa067 authored tarafından Steve Dower's avatar Steve Dower

Issue #28732: Adds new errors to spawnv emulation for platforms that only have fork and execv

üst bce26262
...@@ -832,6 +832,10 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"): ...@@ -832,6 +832,10 @@ if _exists("fork") and not _exists("spawnv") and _exists("execv"):
def _spawnvef(mode, file, args, env, func): def _spawnvef(mode, file, args, env, func):
# Internal helper; func is the exec*() function to use # Internal helper; func is the exec*() function to use
if not isinstance(args, (tuple, list)):
raise TypeError('argv must be a tuple or a list')
if not args[0]:
raise ValueError('argv first element cannot be empty')
pid = fork() pid = fork()
if not pid: if not pid:
# Child # Child
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment