Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 1st, 2005, 06:45 AM
wavelet
Guest
 
Posts: n/a
Default how to get pid from system() call in c/c++?

main()
{
system("call B");
printf("main..");
}

How can I get the process id of system call
in c/c++ language?

What I want to do is to kill that process after
sometimes later.

Thx.



  #2  
Old September 1st, 2005, 07:05 AM
Zara
Guest
 
Posts: n/a
Default Re: how to get pid from system() call in c/c++?

wavelet wrote:[color=blue]
> main()
> {
> system("call B");
> printf("main..");
> }
>
> How can I get the process id of system call
> in c/c++ language?
>
> What I want to do is to kill that process after
> sometimes later.
>[/color]

All this is OS and/or implementation dependent. You should check in
comp.os. <your operating system>.

Best regards
  #3  
Old September 1st, 2005, 08:55 AM
Maxim Yegorushkin
Guest
 
Posts: n/a
Default Re: how to get pid from system() call in c/c++?


wavelet wrote:[color=blue]
> main()
> {
> system("call B");
> printf("main..");
> }
>
> How can I get the process id of system call
> in c/c++ language?
>
> What I want to do is to kill that process after
> sometimes later.[/color]

system() does not return until the process has finished. There is
nothing left to kill after the call.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles