469,954 Members | 1,637 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,954 developers. It's quick & easy.

Set ulimit when using subprocess.Popen?

Hi, all,

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

--
Jarek Zgoda
Skype: jzgoda | GTalk: zg***@jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)
Jan 28 '08 #1
3 6898


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
Jan 28 '08 #2
Rob Wolfe napisa³(a):
>
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)
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. ;)

--
Jarek Zgoda
Skype: jzgoda | GTalk: zg***@jabber.aster.pl | voice: +48228430101

"We read Knuth so you don't have to." (Tim Peters)
Jan 28 '08 #3


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

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)

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

Jan 28 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Darren Dale | last post: by
3 posts views Thread by madpython | last post: by
9 posts views Thread by Clodoaldo Pinto Neto | last post: by
12 posts views Thread by Eric_Dexter | last post: by
25 posts views Thread by Jeremy Banks | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.