System call select on R4600
My problem is "select" system call always return -1 and errno is -4142, but sys_select has never been called. Think, it has some problem on handling system call. Because if I change SYS(sys_select, 5) to 4 arguments, sys_select will be executed.
Thanks!
Compiler: gcc-3.3.3
Kernel: mips-linux-2.4.25/mips-linux-2.4.26
Compile parameter:
-Wno-inline \
-Werror-implicit-function-declarations \
-fno-PIC \
-fno-common \
-mno-abicalls \
-mlong-calls \
-march=r4600 \
-mtune=r4600 \
-G 0 \
-Wa,--trap
Quoted 6 lines · Macleod
My problem is "select" system call always return -1 and errno is -4142, but
sys_selecthas never been called. Think, it has some problem on handling system call. Because if I changeSYS(sys_select, 5)to 4 arguments,sys_selectwill be executed.
Thanks!
This is a bug which was fixed a while ago. I assume your application is picking up a bad definition from an old kernel header package or so. Still doing syscalls directly is a fragily; better avoid and use your libc's select(3).
Ralf