targclose doesn't return

From: Alex Dupre <ale_at_FreeBSD.org>
Date: Tue, 03 Apr 2007 16:32:37 +0200
Hello,
I found an incorrect behavior of the targ device on -CURRENT: closing 
the descriptor doesn't return. On -STABLE it works. I think to have 
identified the problem (or at least the change that exposed it) in the 
conditional msleep() call added into kern_conf.c to destroy_devl() in 
rev. 1.119.

This is a simple testcase:


#include <err.h>
#include <fcntl.h>

int
main(int argc, char *argv[])
{
         int targ_fd = open("/dev/targ0", O_RDWR);

         if (targ_fd < 0)
             err(1, "Do you have 'device targ' in your kernel?");

         close(targ_fd);
}

-- 
Alex Dupre
Received on Tue Apr 03 2007 - 12:32:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:07 UTC