I am porting some of code from solaris to linux..
The following code compiles fine on linux
Code:
int parentinputfd;
int bytestoread = 0;
...
result = ioctl (parentinputfd, I_NREAD, &bytestoread);
...
But when i run my program i get errorno = 22..
which is present in errorno.h as
Quote:
#define EINVAL 22 /* Invalid argument */
|
And program print error as
ioctl: Invalid argument
I am not getting that why its working properly on solaris but not on linux ..
Is I_NREAD worls on linux..??
And what are the alternatives for I_NREAD