home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!rpi!sarah!cook!karp.albany.edu!ganesh
- From: ganesh@cs.albany.edu (Ganesh Murugesan)
- Subject: Re: system call in C
- In-Reply-To: c23rrj@kocrsv01.delcoelect.com's message of 14 Sep 92 17:04:54 GMT
- Message-ID: <GANESH.92Sep14160518@karp.albany.edu>
- Originator: ganesh@karp.albany.edu
- Sender: ganesh@cs.albany.edu (Ganesh Murugesan)
- Organization: Computer Science Department, SUNY at Albany, Albany, NY 12222
- References: <1992Sep14.170454.13955@kocrsv01.delcoelect.com>
- Date: Mon, 14 Sep 1992 21:05:18 GMT
- Lines: 24
-
- In article <1992Sep14.170454.13955@kocrsv01.delcoelect.com> c23rrj@kocrsv01.delcoelect.com (Rajnish Joshi) writes:
-
-
-
- > Help ! If I make a system call (from a C prog.) such as
- >
- > system (command);
- >
- > where 'command' may be a command to compile some program, then how can I
- > obtain the process-id of the process which is doing the compile task. The sytem
- > call returns only the success code. I need to know the pid of the requested
- > command since I want to use it in the C code that follow the system call.
- >
- > Thanks
-
-
- You cannot do that way. For that you have to do a fork and then execve
-
- to load and execute the program. (Anyway that is what "system" itself
- does)
-
- Ganesh
- Dept of Comp. Science
- SUNY at Albany
-