Set ulimit when using subprocess.Popen?
Rob Wolfe
rw at smsnet.pl
Mon Jan 28 09:26:05 EST 2008
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
More information about the Python-list
mailing list