subprocess.Popen strange bhaviour

Discussion in 'Python' started by Mac Smith, Jan 18, 2012.

  1. Mac Smith

    Mac Smith Guest

    Hi,

    I am using subprocess.Popen to start a movie ripping command HandBrakeCLI. My server is 64bit ubuntu server and has 8 cores. When the command starts it uses all 8 cores upto 80%-100% and works fine, but after 270 seconds the cpu usage of all the cores drops to 0% - 1%. I tried this many time this happens exactly after 270 seconds. Is there some predefined timeout??

    --
    Mac
     
    Mac Smith, Jan 18, 2012
    #1
    1. Advertising

  2. On Wed, 18 Jan 2012 14:44:37 +0530, Mac Smith wrote:

    > Hi,
    >
    > I am using subprocess.Popen to start a movie ripping command
    > HandBrakeCLI. My server is 64bit ubuntu server and has 8 cores. When the
    > command starts it uses all 8 cores upto 80%-100% and works fine, but
    > after 270 seconds the cpu usage of all the cores drops to 0% - 1%. I
    > tried this many time this happens exactly after 270 seconds. Is there
    > some predefined timeout??


    I think you have misunderstood subprocess.Popen. It launches the new
    process (HandBrakeCLI) then what happens in that new process is
    independent of Python and Popen.

    How are you calling HandBrakeCLI? Is it ripping directly from a device or
    file, or is it reading from stdin? If reading from stdin, possibly it is
    waiting for more data from you. Or perhaps it has simply finished ripping
    and there's nothing else for it to do and the process ends.


    --
    Steven
     
    Steven D'Aprano, Jan 18, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michele Simionato

    subprocess.Popen

    Michele Simionato, Dec 12, 2004, in forum: Python
    Replies:
    5
    Views:
    17,666
  2. Ivo Woltring
    Replies:
    4
    Views:
    3,558
    Jeff Shannon
    Jan 27, 2005
  3. John Abel
    Replies:
    2
    Views:
    3,304
    John Abel
    May 12, 2005
  4. Abhishek Saksena

    bhaviour of front method on an empty map

    Abhishek Saksena, Mar 2, 2006, in forum: C++
    Replies:
    7
    Views:
    347
    Dietmar Kuehl
    Mar 2, 2006
  5. File.popen/IO.popen

    , May 20, 2006, in forum: Ruby
    Replies:
    1
    Views:
    232
    Robert Klemme
    May 20, 2006
Loading...

Share This Page