Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #44619

Re: "python.exe has stopped working" when os.execl() runs on Windows 7

From Neil Cerutti <neilc@norwich.edu>
Newsgroups comp.lang.python
Subject Re: "python.exe has stopped working" when os.execl() runs on Windows 7
Date 2013-05-02 12:50 +0000
Organization Norwich University
Message-ID <auf5o1Fovg8U1@mid.individual.net> (permalink)
References (5 earlier) <klikch$m3$1@ger.gmane.org> <CAA=1kxTrTFESz30QVRcjgXd3NRvMriYz640j=hR7qjp_QrBs=A@mail.gmail.com> <mailman.1136.1367136310.3114.python-list@python.org> <0d9d14dc-877b-4b68-aefe-834b530dee2c@googlegroups.com> <mailman.1223.1367442043.3114.python-list@python.org>

Show all headers | View raw


On 2013-05-01, F?bio Santos <fabiosantosart@gmail.com> wrote:
> Reproduced in Windows 7 Ultimate:
>
>>>> import os
>>>> os.execl('ping.exe', '')
>
> At this point the REPL freezes, and windows prompts me to close Python
> since it stopped responding.

To repeat others and the documentation:

  In either case, the arguments to the child process should start
  with the name of the command being run, but this is not
  enforced.

The argument list must contain the executable as its first
argument. Python indeed crashes if I don't include the first
argument as directed.

In any case, on Windows I would normally need to do something
like this instead:

os.execlp('cmd.exe', 'cmd.exe', '/K', 'ping.exe')

-- 
Neil Cerutti

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

"python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 17:22 -0700
  Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Dave Angel <davea@davea.name> - 2013-04-27 20:55 -0400
    Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 18:05 -0700
      Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Dave Angel <davea@davea.name> - 2013-04-27 22:02 -0400
        Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 20:42 -0700
          Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Terry Jan Reedy <tjreedy@udel.edu> - 2013-04-28 03:51 -0400
            Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-28 18:39 -0700
          Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Fábio Santos <fabiosantosart@gmail.com> - 2013-04-28 09:02 +0100
            Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-28 18:34 -0700
          Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Fábio Santos <fabiosantosart@gmail.com> - 2013-04-28 09:05 +0100
            Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-28 18:38 -0700
              Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Fábio Santos <fabiosantosart@gmail.com> - 2013-05-01 22:00 +0100
                Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Neil Cerutti <neilc@norwich.edu> - 2013-05-02 12:50 +0000
  Re: "python.exe has stopped working" when os.execl() runs on Windows 7 Nobody <nobody@nowhere.com> - 2013-04-28 04:53 +0100
    Re: "python.exe has stopped working" when os.execl() runs on Windows 7 cormogram@gmail.com - 2013-04-27 22:06 -0700

csiph-web