For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > April 2007 > Ksh Question - Can I control the process table name of a function running in the back









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Ksh Question - Can I control the process table name of a function running in the back
Tom

2007-04-12, 10:03 pm

First, let me start off by saying I'm a bit of a Unix hack, so forgive
me if I use the wrong terminology.

I have a ksh script (we'll call it driver.shl) which sources in a
seperate script full of functions (func.shl). It then calls a
function (func_a) via the eval command in the background (ie, eval
func_a &). When I call ps to see how many occurrences of "driver.shl"
are running, I see the parent, and then all the children which are
actually running my func_a function in the background. Is this
something I can control? Or is this just something inherit in
subprocess which use functions instead of a different ksh script?
>From what I've read, on AIX, I can't change the name in the process

table.

If not, I suppose I can change my logic to only count the occurrences
of "driver.shl" in the process table which do not have a parent
associated with "driver.shl".

Any thoughts / more elegant solutions?
Thanks, Tom

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com