while((readfd = read(pfd[0], buffer, sizeof(buffer))) != 0)
{
input = atoi(buffer);
printf("Testing : %d \n", input);
if(input == 1)
{
kill(ppid, SIGCONT);
printf("Button ON \n");
}
Type: Posts; User: cruxxe
while((readfd = read(pfd[0], buffer, sizeof(buffer))) != 0)
{
input = atoi(buffer);
printf("Testing : %d \n", input);
if(input == 1)
{
kill(ppid, SIGCONT);
printf("Button ON \n");
}
if(pid == 0)
{
printf("I am the grandchild process %d\n", pid);
/* closes the output side of the pipe */
close(pfd[1]);
/* read input from pipe */
while((test =...
Thanks Hammer... :p
I can have some rest now.........proggie is working.
Thanks everyone for your help. :D
/scan word from file/
do
{
wordscan = fscanf(f, "%s", buffer);
if (wordscan != EOF)
{
if(strstr(buffer, filter))
{
temp = buffer;
while ((c = fgetc(f)) != '>')
{
sprintf(buffer, "%s");
validate(buffer);
if(c == EOF)
break;
}
Thanks....well..this is how I check for EOF, is there any other better way?? This way...
Hi Hammer.....
I am not very sure what you are trying to tell me :confused:
because it seems ok when I tested the codes out. It reads anything that is inside the " ". Could you please...
#include <stdio.h>
#include <errno.h>
#include <string.h>
int main(int argc, char **argv)
{
FILE *f;
int c;