![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Executing shell program from a web page | venkatritch | Shell Programming and Scripting | 5 | 06-14-2008 05:36 AM |
| Executing an .ec program in different informix versions | matrixmadhan | High Level Programming | 0 | 05-21-2005 06:29 AM |
| executing the su command from a java program. | shailendrat | UNIX for Dummies Questions & Answers | 1 | 03-24-2005 12:27 PM |
| executing a program within a program | Gekko | High Level Programming | 4 | 06-27-2002 03:36 PM |
| Allowing a script to continue executing when a command hangs | mkinney | Shell Programming and Scripting | 5 | 04-24-2002 01:28 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
after executing execvp()... program hangs up
Hi ,
I m actually trying to implement pipes program,but after executing the execvp(),my program is getting hanged up ![]() Actaully i m getting the desired output expected from execvp()...but once results are displayed on the output screen ,program is getting hanged up values of variables before execution of this code intial_command=more argList[0]=more argList[1]=NULL child code: { close(0); dup2(pipes[0][1],0); close(pipes[0][0]); execvp(intial_command,argList); } parent code: printf("after child"); waitpid(pid,&status,0); i guess since i have closed the stdin using close(0) thats y i m not able to input anythng even after execvp()...but as far my knowledge once the execvp() functions gets executed the child process gets terminated..so my program should resume to parent process Last edited by Crab; 09-17-2006 at 09:47 PM.. |
|
||||
|
execvp does not create a new process. It replaces the current process.
Proper sequence of events would be:
Maybye you're using fork already, but that code snippet doesn't show it.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|