Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit : > Linux dup(2) manpage: > > ERRORS > EBADF > newfd is out of the allowed range for file descriptors (like negative) > EINVAL (dup3()) > oldfd was equal to newfd > > Reported-by: Clang Static Analyzer > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> > --- > linux-user/syscall.c | 32 +++++++++++++++++++++++--------- > 1 file changed, 23 insertions(+), 9 deletions(-) >
I don't understand why we need that: the dup()/dup2()/dup3() functions will return the good error number. Could you be more explicit on the reason? Thanks, Laurent