MACSCRPT Archives

January 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brian Johnson <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 18 Jan 2006 21:24:20 -0800
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (19 lines)
I want background scripts to get lower priority on a web server than CGI 
scripts. To do this, it seems that I want to manipulate the "nice number" 
for the background script processes. I worked out a chunk of code to get 
the PID of the current process (starting with "path to me") and eventually 
get to

   set the_result to do shell script ("renice +4 " & the_pid)

This seems to work, but "the_result" doesn't seem to receive the text 
normally associated with a terminal-window renice, something like

   2636: old priority 0, new priority 4

I don't absolutely need this if I'm willing to trust that it works, but I 
got to wondering... where's that text going (in the case of do shell 
script)? I thought do shell script returned the text written to std_out ?

  - brian johnson (battling low priority to-do lists by night)

ATOM RSS1 RSS2