Falessi D.
2004-02-24 16:47:22 UTC
Hi, I've two questions:
1)I've this code in Linux
int i;
i = fcntl(pcbp->tt_fd, F_GETFL, 0)) == -1);
i |= O_NDELAY;
(void)fcntl(pcbp->tt_fd, F_SETFL, i);
In order to operate in VxWorks must be converted in:
int setting=1;
ioctl(pcbp->tt_fd, FIONBIO, &setting);
//pcbp->tt_fd is a socket descriptor(no a file descriptor)
Is it ok?
2)But in this case (no a socket no a file descriptor but the standard input)
flags = fcntl( 0, F_GETFL, 0 );
fcntl( 0, F_SETFL, flags | O_NDELAY );
What I've to write?
Eng D. Falessi
1)I've this code in Linux
int i;
i = fcntl(pcbp->tt_fd, F_GETFL, 0)) == -1);
i |= O_NDELAY;
(void)fcntl(pcbp->tt_fd, F_SETFL, i);
In order to operate in VxWorks must be converted in:
int setting=1;
ioctl(pcbp->tt_fd, FIONBIO, &setting);
//pcbp->tt_fd is a socket descriptor(no a file descriptor)
Is it ok?
2)But in this case (no a socket no a file descriptor but the standard input)
flags = fcntl( 0, F_GETFL, 0 );
fcntl( 0, F_SETFL, flags | O_NDELAY );
What I've to write?
Eng D. Falessi