By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,234 Members | 1,889 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,234 IT Pros & Developers. It's quick & easy.

Source code for "pgrep"

P: n/a
Hello.

I am writing a program which has to send a signal (SIGUSR2 F.Y.I.) to a
certain process, which I only know the name of, i.e. I need the PID for
that process. How can I do this in C or C++?
Also, I want to know where I can find the source code for the "pgrep"
program.

Thanks in advance.

--
Deniz Dogan
Jun 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Deniz Dogan <kr*******@nospam.comwrites:
I am writing a program which has to send a signal (SIGUSR2 F.Y.I.) to
a certain process, which I only know the name of, i.e. I need the PID
for that process. How can I do this in C or C++?
This question would be better asked in comp.unix.programmer or a
newsgroup specific to your actual operating system.
Also, I want to know where I can find the source code for the "pgrep"
program.
http://procps.sourceforge.net/
--
"I'm not here to convince idiots not to be stupid.
They won't listen anyway."
--Dann Corbit
Jun 2 '07 #2

P: n/a
On Jun 2, 9:24 am, Deniz Dogan <kristn...@nospam.comwrote:
Hello.

I am writing a program which has to send a signal (SIGUSR2 F.Y.I.) to a
certain process, which I only know the name of, i.e. I need the PID for
that process. How can I do this in C or C++?
Also, I want to know where I can find the source code for the "pgrep"
program.

Thanks in advance.

--
Deniz Dogan
You can find source code for 'pgrep' on Solaris box here

http://src.opensolaris.org/source/xr.../pgrep/pgrep.c

Bye

Guru Jois

Jun 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.