Skip to content

Commit 7da3cc5

Browse files
committed
Michael Hudson:
I think that after this patch, all objects in the os module (with names that don't start with "_") that can have docstrings, do, on Linux at least. Also fix a nit in one of my spawn* docstrings.
1 parent e7ab64e commit 7da3cc5

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

Lib/os.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,23 +183,51 @@ def renames(old, new):
183183
environ = {}
184184

185185
def execl(file, *args):
186+
"""execl(file, *args)
187+
188+
Execute the executable file with argument list args, replacing the
189+
current process. """
186190
execv(file, args)
187191

188192
def execle(file, *args):
193+
"""execle(file, *args, env)
194+
195+
Execute the executable file with argument list args and
196+
environment env, replacing the current process. """
189197
env = args[-1]
190198
execve(file, args[:-1], env)
191199

192200
def execlp(file, *args):
201+
"""execlp(file, *args)
202+
203+
Execute the executable file (which is searched for along $PATH)
204+
with argument list args, replacing the current process. """
193205
execvp(file, args)
194206

195207
def execlpe(file, *args):
208+
"""execlpe(file, *args, env)
209+
210+
Execute the executable file (which is searched for along $PATH)
211+
with argument list args and environment env, replacing the current
212+
process. """
196213
env = args[-1]
197214
execvpe(file, args[:-1], env)
198215

199216
def execvp(file, args):
217+
"""execp(file, args)
218+
219+
Execute the executable file (which is searched for along $PATH)
220+
with argument list args, replacing the current process.
221+
args may be a list or tupe of strings. """
200222
_execvpe(file, args)
201223

202224
def execvpe(file, args, env):
225+
"""execv(file, args, env)
226+
227+
Execute the executable file (which is searched for along $PATH)
228+
with argument list args and environment env , replacing the
229+
current process.
230+
args may be a list or tupe of strings. """
203231
_execvpe(file, args, env)
204232

205233
_notfound = None
@@ -338,7 +366,7 @@ def spawnv(mode, file, args):
338366
Execute file with arguments from args in a subprocess.
339367
If mode == P_NOWAIT return the pid of the process.
340368
If mode == P_WAIT return the process's exit code if it exits normally;
341-
otherwise return - (the signal that killed it). """
369+
otherwise return -SIG, where SIG is the signal that killed it. """
342370
return _spawnvef(mode, file, args, None, execv)
343371

344372
def spawnve(mode, file, args, env):

0 commit comments

Comments
 (0)