Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b6aa856f
Commit
b6aa856f
authored
Sep 27, 2004
by
Armin Rigo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1009075, bug #952953: allow execve with empty 2nd argument
parent
9f904398
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
+2
-14
Doc/lib/libos.tex
Doc/lib/libos.tex
+2
-2
Modules/posixmodule.c
Modules/posixmodule.c
+0
-12
No files found.
Doc/lib/libos.tex
View file @
b6aa856f
...
...
@@ -1226,8 +1226,8 @@ the individual parameters simply become additional parameters to the
\function
{
execl*()
}
functions. The
\character
{
v
}
variants are good
when the number of parameters is variable, with the arguments being
passed in a list or tuple as the
\var
{
args
}
parameter. In either
case, the arguments to the child process
must
start with the name of
the command being run.
case, the arguments to the child process
should
start with the name of
the command being run
, but this is not enforced
.
The variants which include a
\character
{
p
}
near the end
(
\function
{
execlp()
}
,
\function
{
execlpe()
}
,
\function
{
execvp()
}
,
...
...
Modules/posixmodule.c
View file @
b6aa856f
...
...
@@ -2171,12 +2171,6 @@ posix_execv(PyObject *self, PyObject *args)
return
NULL
;
}
if
(
argc
==
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"execv() arg 2 must not be empty"
);
PyMem_Free
(
path
);
return
NULL
;
}
argvlist
=
PyMem_NEW
(
char
*
,
argc
+
1
);
if
(
argvlist
==
NULL
)
{
PyMem_Free
(
path
);
...
...
@@ -2253,12 +2247,6 @@ posix_execve(PyObject *self, PyObject *args)
goto
fail_0
;
}
if
(
argc
==
0
)
{
PyErr_SetString
(
PyExc_ValueError
,
"execve() arg 2 must not be empty"
);
goto
fail_0
;
}
argvlist
=
PyMem_NEW
(
char
*
,
argc
+
1
);
if
(
argvlist
==
NULL
)
{
PyErr_NoMemory
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment