16 lines
293 B
C
16 lines
293 B
C
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(int argc, char** argv){
|
|
if (args != 2){
|
|
printf("Usage : %s <file>", argv[0]);
|
|
return EXIT_FAILURE;
|
|
}
|
|
int p[2], fd;
|
|
fd = open(argv[1],
|
|
pipe(p);
|
|
execl("/usr/bin/ls", "ls", "-i", "-l", "/tmp", NULL);
|
|
dup2(p[0],0);
|
|
|