bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting EBADF on MSVC


From: Bruno Haible
Subject: Re: getting EBADF on MSVC
Date: Mon, 19 Sep 2011 04:18:35 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

> The newer runtime libraries of MSVC no longer return error codes from
> functions like printf(), close(), dup2(), _get_osfhandle(), when you pass
> an invalid format string or invalid file descriptor.[1][2]
> 
> No, they invoke a so-called "invalid parameter handler" which exists once per
> process (i.e. it's a piece of global state).[3]

So, gnulib needs more unit tests of EBADF return codes.

I've added such tests for 'accept' and 'accept4'. More such tests are to come
for:

  bind
  close
  connect
  dprintf
  dup
  dup2
  faccessat
  fchdir
  fchmod
  fchown
  fclose
  fcntl
  fdatasync
  fdopen
  fdopendir
  fdutimensat
  fflush
  fgetc
  fputc
  freopen
  fseeko
  fstat
  fsync
  ftello
  ftruncate
  futimens
  getpeername
  getsockname
  getsockopt
  grantpt
  ioctl
  isatty
  linkat
  listen
  lseek
  mkfifoat
  openat
  posix_spawn_file_actions_addclose
  posix_spawn_file_actions_adddup2
  posix_spawn_file_actions_addopen
  pread
  pwrite
  read
  readlinkat
  recv
  recvfrom
  renameat
  select
  send
  sendto
  setsockopt
  shutdown
  symlinkat
  ttyname_r
  unlockpt
  utimens
  utimensat
  vdprintf
  write

Bruno
-- 
In memoriam Bernhard Bästlein <http://en.wikipedia.org/wiki/Bernhard_Bästlein>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]