diff options
author | Christopher Faylor <me@cgf.cx> | 2003-07-26 04:53:59 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-07-26 04:53:59 +0000 |
commit | df04ae29b258b89bbd4991bd862a03ac56430e4e (patch) | |
tree | f853669603e469c7c37bc4c829a247b16958464f /winsup/cygwin/mmap.cc | |
parent | ddb67621550071ee1472cb114704af155d46365b (diff) | |
download | cygnal-df04ae29b258b89bbd4991bd862a03ac56430e4e.tar.gz cygnal-df04ae29b258b89bbd4991bd862a03ac56430e4e.tar.bz2 cygnal-df04ae29b258b89bbd4991bd862a03ac56430e4e.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r-- | winsup/cygwin/mmap.cc | 6 |
1 files changed, 3 insertions, 3 deletions
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) |