This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

warnings on handle close


Hi!

  this program complains about error on handle close.

#include <sys/fcntl.h>

int main ()
{
  int f = open ("/dev/tty", O_RDWR);
  fcntl (f, F_SETFD, 1);
  close (f);
}

the reason is that we duplicate handle when fcntl is called, but it's
old handle value that's left registered in handle list.
patch attached.

egor.            mailto:deo@logos-m.ru icq 5165414 fidonet 2:5020/496.19

rereg-handle-on-inheriting.diff

rereg-handle-on-inheriting.ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]