-
-
Save binh12A3/036e6d6e6d110c2406040c9529c707eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> // for using std, printf(),... | |
#include <unistd.h> // for using fork(), execl() | |
int main(int argc, char** argv) | |
{ | |
printf("Hello world\n"); | |
execl("/bin/ls", "-ltr", (char*)0); | |
printf("Goodbye\n"); | |
return 0; | |
} | |
/* | |
OUTPUT: | |
Hello world | |
mylib test test.cpp | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment