From df04ae29b258b89bbd4991bd862a03ac56430e4e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 26 Jul 2003 04:53:59 +0000 Subject: * exceptions.cc (ctrl_c_handler): Send SIGHUP when events occur only if there is a tty associated with the process. Send SIGHUP on CTRL_LOGOFF_EVENT. * fhandler_tty.cc (fhandler_tty_slave::open): Adjust console open handle counter regardless of whether this is a pty or tty. (fhandler_tty_slave::open): Ditto. (fhandler_tty_slave::dup): Ditto. (fhandler_tty_common::set_close_on_exec): Ditto. (fhandler_tty_master::init_console): Decrement console open handle counter after init since it will now be handled by all tty open. * syscalls.cc (setsid): Rework debugging output slightly. --- winsup/cygwin/mmap.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/mmap.cc') diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 32287b1cb..7d8809e47 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -332,7 +332,7 @@ list::match (caddr_t addr, DWORD len, caddr_t &m_addr, DWORD &m_len, for (int i = start + 1; i < nrecs; ++i) { low = (addr >= recs[i].get_address ()) ? addr : recs[i].get_address (); - high = recs[i].get_address () + high = recs[i].get_address () + (PAGE_CNT (recs[i].get_size ()) * getpagesize ()); high = (addr + len < high) ? addr + len : high; if (low < high) @@ -565,7 +565,7 @@ mmap64 (caddr_t addr, size_t len, int prot, int flags, int fd, _off64_t off) The offset is re-added when evaluating the return value. */ if (base) base -= off - gran_off; - + HANDLE h = fh->mmap (&base, gran_len, access, flags, gran_off); if (h == INVALID_HANDLE_VALUE) @@ -843,7 +843,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, DWORD access, if (!base && !(flags & MAP_FIXED)) base = MapViewOfFileEx (h, access, high, low, len, NULL); debug_printf ("%x = MapViewOfFileEx (h:%x, access:%x, 0, off:%D, " - "len:%u, addr:%x)", base, h, access, off, len, *addr); + "len:%u, addr:%x)", base, h, access, off, len, *addr); if (!base || ((flags & MAP_FIXED) && base != *addr)) { if (!base) -- cgit v1.2.3