blob: 5076dcf4ad0ee388db15bf8e16f2628cb01d645d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
int main()
{
setbuf(stdout,NULL);
printf("\nIan C\n\n-- \n");
/*system("fortune /home/ianc/Documents/sigfortune");*/
switch (fork())
{
case 0:
execlp("fortune","fortune","/home/ianc/Documents/sigfortune",(const char *)NULL);
case -1:
break;
default:
wait(NULL);
break;
}
}
|