Hi,
The system call select() is not blocking when its invoked from a service. Its returns no error.
Interested to know why its returning non blocking when calling from service? where as works as expected while running complied app from command prompt.
example code at https://man7.org/linux/man-pages/man2/select.2.html was tried.
In this instead of waiting for console input the select returns and says it has a data!
retval = select(1, &rfds, NULL, NULL, &tv);
/* Don't rely on the value of tv now! */
if (retval == -1)
perror("select()");
else if (retval)
printf("Data is available now.\n");
Regards,
Bijesh
Regards,
Bijesh V.M.
The system call select() is not blocking when its invoked from a service. Its returns no error.
Interested to know why its returning non blocking when calling from service? where as works as expected while running complied app from command prompt.
example code at https://man7.org/linux/man-pages/man2/select.2.html was tried.
In this instead of waiting for console input the select returns and says it has a data!
retval = select(1, &rfds, NULL, NULL, &tv);
/* Don't rely on the value of tv now! */
if (retval == -1)
perror("select()");
else if (retval)
printf("Data is available now.\n");
Regards,
Bijesh
Regards,
Bijesh V.M.