![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Determine Number of Processes Running | wayne1411 | Shell Programming and Scripting | 4 | 12-17-2007 12:06 PM |
| Running a program on boot! | D-Lexy | UNIX for Dummies Questions & Answers | 4 | 12-04-2002 02:14 PM |
| Running a program | perleo | UNIX for Dummies Questions & Answers | 3 | 08-23-2002 07:34 AM |
| Running a program automatically | jvadn0 | Shell Programming and Scripting | 3 | 03-12-2002 01:38 AM |
| Running a compiled Program | Krebsbac | High Level Programming | 2 | 09-07-2001 01:39 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#8
|
|||
|
|||
|
All I'm saying is that ps on some systems invokes kernel mode code. I agree that spawning a process for this from C is a bad idea, but until the OP learns internals and systems calls he cannot get away from ps..
|
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Quote:
get the processid, and send signal-0 to that processid if return value is equal to 0, process is available else its not available, here there is no need to spawn a process with system call, isn't this better ??? |
|
#10
|
|||
|
|||
|
Quote:
if you dont accept what Jim said, i believe you should read the kernal internal data structure- process table as such ... which is done by ps. And the code should itself switch to kernal mode to become permissible to read the process table and its entries |
|
#11
|
||||
|
||||
|
Quote:
Quote:
|
|
#12
|
|||
|
|||
|
Quote:
my intention was just to say.. read the kernel data structure - process table and its entries the usage ps is just an example and not a standard |
|
#13
|
|||
|
|||
|
the unix programming faq contains sample programms for that. on linux it can be done by
searching /proc |
|||
| Google The UNIX and Linux Forums |
| Tags |
| linux |
| Thread Tools | |
| Display Modes | |
|
|