Nice bridges [message #93019] |
Mon, 11 April 2016 04:46  |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
Is there a way to set the nice level of the child processes created by IDL_IDLBridge?
/Mats
|
|
|
|
Re: Nice bridges [message #93022 is a reply to message #93021] |
Mon, 11 April 2016 07:09   |
Yngvar Larsen
Messages: 134 Registered: January 2010
|
Senior Member |
|
|
On Monday, 11 April 2016 15:39:23 UTC+2, Mats Löfdahl wrote:
> Den måndag 11 april 2016 kl. 13:46:08 UTC+2 skrev Mats Löfdahl:
>> Is there a way to set the nice level of the child processes created by IDL_IDLBridge?
>>
>> /Mats
>
> This is in linux, by the way.
Something ugly like this should work. (Unix specific, obviously.)
IDL> b = idl_idlbridge()
% Loaded DLM: IDL_IDLBRIDGE.
IDL> b->execute, "pid = call_external('libc.so.6', 'getpid')"
IDL> pid = b->getvar('pid') & print, pid
39558
IDL> spawn, 'renice -n 19 '+string(pid)
39558: old priority 0, new priority 19
--
Yngvar
|
|
|
Re: Nice bridges [message #93023 is a reply to message #93022] |
Mon, 11 April 2016 07:20  |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
Den måndag 11 april 2016 kl. 16:09:15 UTC+2 skrev Yngvar Larsen:
> On Monday, 11 April 2016 15:39:23 UTC+2, Mats Löfdahl wrote:
>> Den måndag 11 april 2016 kl. 13:46:08 UTC+2 skrev Mats Löfdahl:
>>> Is there a way to set the nice level of the child processes created by IDL_IDLBridge?
>>>
>>> /Mats
>>
>> This is in linux, by the way.
>
> Something ugly like this should work. (Unix specific, obviously.)
>
> IDL> b = idl_idlbridge()
> % Loaded DLM: IDL_IDLBRIDGE.
> IDL> b->execute, "pid = call_external('libc.so.6', 'getpid')"
> IDL> pid = b->getvar('pid') & print, pid
> 39558
> IDL> spawn, 'renice -n 19 '+string(pid)
> 39558: old priority 0, new priority 19
>
> --
> Yngvar
Thanks.
I just realized that the child processes get whatever nice level the idl process has, so that was an easy solution to my problem.
|
|
|