Set ulimit when using subprocess.Popen?

J

Jarek Zgoda

Hi, all,

anybody has an idea on how to set ulimit (-v in my case, linux) for
process started using subprocess.Popen?
 
R

Rob Wolfe

Jarek Zgoda napisa³(a):
Hi, all,

anybody has an idea on how to set ulimit (-v in my case, linux) for
process started using subprocess.Popen?

What about:

from subprocess import call
call('ulimit -v 1000 && ulimit -v && ls', shell=True)

HTH,
Rob
 
J

Jarek Zgoda

Rob Wolfe napisa³(a):
Jarek Zgoda napisa³(a):

What about:

from subprocess import call
call('ulimit -v 1000 && ulimit -v && ls', shell=True)

subprocess.Popen('ulimit -v 1024; ls', shell=True) works perfect.

Unfortunately, the nature of ulimit impacts deadly my application when
the limit is reached, so this knowledge is of no help in my case. ;)
 
R

Rob Wolfe

Jarek Zgoda napisał(a):
Rob Wolfe napisa�(a):

subprocess.Popen('ulimit -v 1024; ls', shell=True) works perfect.

Unfortunately, the nature of ulimit impacts deadly my application when
the limit is reached, so this knowledge is of no help in my case. ;)

Use "ulimit -v unlimited" then.

RW
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top