View Single Post
Old 03-22-2003, 06:44 PM   #5 (permalink)
paul
Registered User
 
Join Date: Feb 2003
Location: NS, Canada
Posts: 15
paul is on a distinguished road
Thanks, this should help.

I just need some clerification though:

Code:
#include 
#include 
#include 
#include 

main(int argc, char **argv, char **envp) { 
pid_t me, a; 
me = fork(); 
if (!me) { 
printf("Child process about to execve() a shell...\n"); 
printf("Type 'exit' to leave\n");
if (execve("/bin/bash", argv, envp)) { 
printf("Error condition %d.\n", errno); } 
else { a = waitpid(me, NULL, 0); printf("Parent process done.\n"); } }
Why doesnt it show the includes?
Can I do other things until the fork ends?
paul is offline   Reply With Quote