Hi all. I have some code which does what i need it to do on a standard Linux platform. However i need to make it work on the uClinux kernel, which is used for microcontrollers. To do this, i have been told i will need to change fork() to vfork().
If someone would be able to help me, or guide me on how to make this work on uClinux using the vfork(), i would appreciate it.
Here is the code:
/*if (signal (SIGALRM, termination_handler) == SIG_IGN)*/
signal (SIGALRM, termination_handler);
printf("This is the child writing to the pipe\n");
write(pipedescriptor, "TST", 4);
printf("This is the child exiting the pipe\n");
printf("This is the parent reading from the pipe\n");
read(pipedescriptor, buff, 4);
printf("Parent reading form pipe: \"%s\"\n", buff);
void termination_handler (int signum)
printf("Total messeges sent: %d\n",test_pipe);
printf("Total bytes per second: %d\n",(test_pipe*4)/10);
Any help is appreciated.