Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Tests bu_exit, returns 0 if bu_exit works properly */
- int test_bu_exit()
- {
- pid_t childpid;
- int status;
- childpid = fork();
- if( childpid >= 0 ) /* fork worked */
- {
- if(childpid == 0)
- {
- bu_exit(0,"test");
- }
- else
- {
- wait(&status);
- }
- }
- return status;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement