6
#include <sys/socket.h>
11
void runparent(pid_t child) {
17
signal(13,sp_handler);
19
readed=read(f[0],buf,254);
20
if (readed>0) writed=write(0,buf,readed);
23
// Waiting for child to be finished!
24
waitpid(child,NULL,0);
31
char buf[100]="Helo!\n\0";
42
printf("Error creating pipe, error: $i!\n",errno);
47
if (child>0) runparent(child);
48
else if (child==0) runchild();
49
else printf("Error forking child, error: %i!\n",errno);