try gentoo linux forum, they should be able to answer your questions
sadique <[EMAIL PROTECTED]> wrote: Let me tell you that I have done
lot of research on the net before I
consider putting my questions on this group; I was not able to find a
single API or an example that can answer my question.
What I am trying to do is get a process ID of a process by providing
its process name in my C++ application under Linux and then check the
priority of the process and depending on the process priority, I want
to set priority of another process. Both the set priority() and get
priority() take PID as an argument rather than using process name.
Can anybody tell me how I can get the process ID of any process from
my application by just providing the process name? I know I can use
#pidof <process name> on terminal, or in my application I could do
something like system("pidof <process name>"), However I do not want
to use the pidof binary since the application I am writing will be
deployed on an embedded system that will have scaled OS and I am not
sure I will have this binary available on the system b/c of space
limitation.
Can anyone point me in a direction on how I can implement my own API
that could return process ID taking process name as an argument?
Thank you
PS:
I have some issues with X Server priority, when my system boots up X
Server always runs with nice value to be -1 and that causes lots of
issues with my application. I guess I will put more detail on this
issue later on.
Join Linux on Toshiba Group
Group name: linux_on_Toshiba Group home page:
http://groups.yahoo.com/group/linux_on_Toshiba Group email address: [EMAIL
PROTECTED]
Fedora Core 4 - Toshiba and Acer Notebooks personal installation notes
Visit http://www.freewebs.com/duckzland
Ndiswrapper notes
Kernel Guide
Fedora Core 4
---------------------------------
Pinpoint customers who are looking for what you sell.
[Non-text portions of this message have been removed]
To unsubscribe from this list, please email [EMAIL PROTECTED] & you will be
removed.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/LINUX_Newbies/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/LINUX_Newbies/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/