Code Comments
Programming Forum and web based access to our favorite programming groups.Does anyone happen to have a sample of code where you've called the "nice" function to give the current process a higher priority on the system? I know it can be done, but am having trouble pinning down the exact syntax/parameters of the call. System Information ------------------ OS: HP-UX 11i COBOL: MF OC 4.2 Thanks in advance for any/all assistance. Chris
Post Follow-up to this messageStephen, Thank you. Your post is exactly the information I was looking for. Chris
Post Follow-up to this messageXref: kermit comp.lang.cobol:85890 01 PUFF-NICE. 3 NICE-GRUND PIC X(07) VALUE "nice ". 3 NICE-RUN PIC X(65). *> for programname 3 NICE-REST PIC X(42) VALUE ">/dev/null>&2/dev/null& echo $!>". 01 MF-CBID. 3 MF-CB-ZEILE. 5 FILLER PIC X(06) VALUE "sh -c ". 5 FILLER PIC X(01) VALUE X"22". *> " 5 W-CMD-RUN PIC X(99). 5 FILLER PIC X(01) VALUE X"22". 5 MF-CMF-N PIC 99 COMP VALUE 00. *> end for example you will start a program "stocklist" in background mode, so you do move "cobrun stocklist &" to nice-run. move puff-nice to w-cmd-run. call "SYSTEM" using mf-cb-zeile. This is running on HP-UX 10.20 and Linux etc. Depending on platform the NICE-REST perhaps NICE-GRUND can be a little different, but it is no problem to fill it on begin of the whole application with correct os-depending-values. Chris wrote: > Does anyone happen to have a sample of code where you've called the > "nice" function to give the current process a higher priority on the > system? I know it can be done, but am having trouble pinning down the > exact syntax/parameters of the call. > > System Information > ------------------ > OS: HP-UX 11i > COBOL: MF OC 4.2 > > Thanks in advance for any/all assistance. > > Chris -- Vaclav Snajdr
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.