On Monday, 3 April 2017 22:37:01 BST Ralph Corderoy wrote:
> > Would this be a standard subprocess.call() invocation or is there a
> > better way?
> 
> The former seems fine AFAICS.

Thanks.

> > Would I need to create two global instances of /dev/null if I use it
> > twice in the same function?
> 
> No, the file descriptor of the open Python File for /dev/null that you
> have it dup(2)'d into the desired position, e.g. 2 if you're specifying
> it's for stderr.

Thanks again.

> > How would the instances of /dev/null show up?
> 
> Clearly.

> So I don't expect you have to do anything to close it.  It's your choice
> if you opening it once per program or once per function.  (I'd still go
> for the former, but you've delivered the code.  :-)

Thanks.  There doesn't seem to be much in the way of memory leaks either; I 
set the program running yesterday evening with dstat in another screen.  When 
launched, I had 794 MB free, this morning it is still over 700 MB.

Since it goes against the grain to routinely reboot a perfectly good system 
every day, I think I'll leave it as it is for the moment and tell the staff to 
keep an eye on it for the next few weeks.  If they notice any problems, then 
all they will have to do is power cycle it.

If it does become a problem, I'll look again at adding the reboot routine; 
maybe not every night, but once a week.  (I once had a router that did that.)

-- 



                Terry Coles

-- 
Next meeting:  Bournemouth, Tuesday, 2017-04-04 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to