prompt-toolkit / pymux

A terminal multiplexer (like tmux) in Python
BSD 3-Clause "New" or "Revised" License
1.45k stars 82 forks source link

Double Exec? #17

Closed odeits closed 8 years ago

odeits commented 8 years ago

Line 102 of process.py

def execv():
    if before_exec_func:
        before_exec_func()

    for p in os.environ['PATH'].split(':'):
        path = os.path.join(p, command[0])
        if os.path.exists(path) and os.access(path, os.X_OK):
            os.execv(path, command)

Should this not return the os.execv? it seems like it will call it for multiple hits in the path.

aarya123 commented 8 years ago

os.execv(), from my understanding, takes over the current process (in this case, tmux) and won't return https://docs.python.org/2/library/os.html#os.execv

odeits commented 8 years ago

You are correct. Closing