473,320 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Source code for "pgrep"

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
2 3965
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tim Zhao | last post by:
I downloaded the PHP 5 source code from www.php.net web site. It is a tar compressed file. I used WinZip to unzip it. Now I got a whole bunch of files. But I do not know to read these files. Do...
2
by: Fernando Rodriguez | last post by:
Hi, Is ti possible to get the source code of a given function object? O:-) TIA
8
by: Michael Dekson | last post by:
Hello, Can I exe file made in Microsoft Visual C++ decompile into source code. If it is possibly please tell me how. Thanks
9
by: Michael Dekson | last post by:
Hello, Can I exe file made in Microsoft Visual C++ decompile into source code. If it is possibly please tell me how. Thanks
8
by: Steven T. Hatton | last post by:
There was recently some discussion of storing source code in databases. To some extent that is a rather common practice. CVS, for example, provides a means of storing source code in a database. ...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
7
by: Tina | last post by:
In 1.1 I used to use a WebControlLibrary to hold code I didn't want to expose when I distributed a component. The code would compile to a separate dll and could not be viewed when used in a vs.net...
66
by: Jon Skeet [C# MVP] | last post by:
I'm sure the net will be buzzing with this news fairly soon, but just in case anyone hasn't seen it yet: Microsoft are going to make the source code for the .NET framework (parts of it,...
4
by: Spizzat2 | last post by:
I'm trying to figure out a workaround to a minor annoyance that I'm coming up with while coding a site. I've got some keyboard shortcuts set up for the site via javascript, and when I press escape,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.