Skip to content

Commit 8870bc0

Browse files
committed
Add exec functions test
1 parent f52f367 commit 8870bc0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎c/linuxc/vim2.c‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <stdio.h>
2+
#include <sys/types.h>
3+
#include <unistd.h>
4+
extern char **environ;
5+
int main(int argc, char *argv[])
6+
{
7+
printf("This message will show");
8+
sleep(10);
9+
execlp("/bin/vi", argv[1], (char *)NULL);
10+
printf("This message will not show");
11+
}

0 commit comments

Comments
 (0)