Advertisement

06.16.2003 at 09:30AM PDT, ID: 20649734
[x]
Attachment Details

C program in Linux. Using a C function to obtain a process ID for a process name.

Asked by lin100 in C Programming Language

Tags: linux, c

1) What is the C function to obtain a process id of say smbd and nmbd or any other process using the name of that process?

2) What is the C function to stop a process ID?

3) I do not want to use a C function to call a bash command such as
     1) system("killall nmbd")
     2) FILE *f;
         f = popen("killall nmbd", "r");

Please provide a C code example for question #1 and question # 2.Start Free Trial
[+][-]06.16.2003 at 11:24AM PDT, ID: 8733955

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: linux, c
Sign Up Now!
Solution Provided By: Salte
Participating Experts: 3
Solution Grade: A
 
 
[+][-]06.16.2003 at 11:26AM PDT, ID: 8733974

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.16.2003 at 11:37AM PDT, ID: 8734060

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.16.2003 at 05:28PM PDT, ID: 8736412

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.16.2003 at 05:32PM PDT, ID: 8736439

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2003 at 01:35AM PDT, ID: 8738621

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32