#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>

main()
{
  char str[10], *res; int x;
  FILE *fd=fopen("/home/me/Desktop/pipe","r");
	int pid=fork();
if(pid==0){  
while(1) {
    res=fgets(str,10,fd);
    if(res!=NULL) {
      x=atoi(str); printf("x: %d.\n", x);
      system("ps -e -o pid,ppid,comm | grep uppg1");
	printf("hej");
    }
	sleep(10);
  }
exit(0);

}
kill(getpid(),-9);
exit(0);

}
