Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
AgeCommit message (Collapse)Author
2011-07-05 * fhandler.cc (fhandler_base::open): Don't open file with WRITE_DACCorinna Vinschen
access on remote filesystem. Explain why. * fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for directories. * fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets. * path.cc (symlink_worker): Ditto for symlinks.
2011-07-04* environ.cc (tty_is_gone): Wrap warning at 80 characters.Christopher Faylor
2011-07-04 Throughout, open console handles with sharing for reading and writing.Corinna Vinschen
* dcrt0.cc (insert_file): Open file with full sharing allowed. * hookapi.cc (find_first_notloaded_dll): Ditto. * spawn.cc (av::fixup): Ditto.
2011-07-04 * dtable.cc (dtable::init_std_file_from_handle): Change test for consoleCorinna Vinschen
device in call to fh->init to avoid conhost crash on W7.
2011-07-04 * environ.cc (environ_init): Reinstantiate on-the-fly CYGWIN variableCorinna Vinschen
test and call to parse_options if found.
2011-07-04* fhandler.cc (fhandler_base::open_with_arch): Call close_on_exec last to avoidChristopher Faylor
setting close_on_exec for archetype. * fhandler_tty.cc (fhandler_pty_master::setup): Protect {from,to}_pty handles. Use consistent naming in debug output. Use inheritable handles and... (fhandler_pty_master::fixup_after_fork): ...avoid duplicating handles here. (fhandler_pty_slave::open): Don't set close_on_exec flag here.
2011-07-02* dtable.cc (cnew): Fix whitespace.Christopher Faylor
2011-07-01 * include/sys/param.h (NGROUPS): Redefine as NGROUPS_MAX.Corinna Vinschen
(MAXHOSTNAMELEN): Redefine with same value as MAX_HOSTNAME_LEN. Change comment. (MAXPATHLEN): Improve comment. (MAXSYMLINKS): Define and add comment.
2011-07-01 * fhandler.cc (fhandler_base::open): Move NFS-specific code into theCorinna Vinschen
code block handling FH_FS stuff.
2011-06-30 * dtable.cc (fh_oom): Remove.Corinna Vinschen
(fh_calloc): Remove. (cnew): Redefine to handle NULL returns from cmalloc. (build_fh_name): Accommodate new definition of cnew. Remove unneeded test for fh_oom. (fh_alloc): Ditto.
2011-06-30 * fhandler_console.cc (fhandler_console::read): Add comment.Corinna Vinschen
(fhandler_console::input_tcsetattr): Don't set ENABLE_PROCESSED_INPUT if IGNBRK flag is set.
2011-06-30 * dtable.cc (fh_oom): New static fhandler storage.Corinna Vinschen
(fh_calloc): New static function. Add a comment to explain why this is needed. (cnew): Call fh_calloc as placement argument. (build_fh_name): Check return code from cnew against address of fh_oom to test for out of memory condition. (fh_alloc): Ditto. (build_fh_pc): Avoid a crash due to useing a NULL fhandler. * pipe.cc (fhandler_pipe::create): Check if build_fh_dev returned a valid pointer before using it.
2011-06-28 * fhandler_process.cc (heap_info::fill_if_match): Rename info toCorinna Vinschen
note that this heap is a Windows heap. (format_process_maps): Print info about application heap.
2011-06-24 * fhandler_console.cc (fhandler_console::read): Don't generate ^@ onCorinna Vinschen
Ctrl+Alt+Space.
2011-06-22 * fhandler_tty.cc (fhandler_pty_master::setup): Create pty pipesCorinna Vinschen
non-inheritable.
2011-06-22 * fhandler_tty.cc (fhandler_pty_master::setup): Fix crash in debugCorinna Vinschen
output.
2011-06-18 * path.cc (normalize_win32_path): Skip all slashes after recognizingCorinna Vinschen
a ".." path component. Add comment.
2011-06-17 * fhandler.cc (fhandler_base::open): Drop local create_options variable.Corinna Vinschen
Use options member instead. * fhandler.h (class fhandler_base): Change type of access member to ACCESS_MASK. Change get_access and set_access methods accordingly. Add options member. Add get_options and set_options methods. (class fhandler_disk_file): Add prw_handle. (fhandler_disk_file::prw_open): Declare. (fhandler_disk_file::close): Declare. (fhandler_disk_file::dup): Declare. (fhandler_disk_file::fixup_after_fork): Declare. * fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Initialize prw_handle to NULL. (fhandler_disk_file::close): Close prw_handle. (fhandler_disk_file::dup): New method. (fhandler_disk_file::fixup_after_fork): Set prw_handle to NULL since prw_handle is not inherited. (fhandler_disk_file::prw_open): New method. Add long comment to explain current behaviour. (fhandler_disk_file::pread): Revert previous change. Change to use prw_handle if possible. (fhandler_disk_file::pwrite): Change to use prw_handle if possible.
2011-06-17 * dcrt0.cc (dll_crt0_1): Call strace.dll_info after call to pinfo_init.Corinna Vinschen
* strace.cc (strace::hello): Drop printing DLL information here since application info is not always available at this point. (strace::dll_info): New method to print DLL info. * include/sys/strace.h (strace::dll_info): Declare.
2011-06-17 * dtable.cc (handle_to_fn): Accommodate name change of pty named pipes,Corinna Vinschen
otherwise ptys are not recognized.
2011-06-17* fhandler_console.cc (fhandler_console::set_unit): Set pc.file_attributes() toChristopher Faylor
reflect existence. * fhandler.h (fhandler_pty_common::fhandler_pty_common): Ditto. * pinfo.cc (_pinfo::set_ctty): Output device numbers in hex.
2011-06-15* errno.cc (EIO): Lowercase "o" representative string.Christopher Faylor
2011-06-15 * cygwinenv.sgml (using-cygwinenv): Move envcache, strip_title, title,Corinna Vinschen
tty, and upcaseenv options to list of obsolete options. * effectively.sgml (using-console): Remove section. * new-features.sgml (ov-new1.7.10): Document removed CYGWIN options. Document removed tty mode.
2011-06-15* cygheap.h (init_cygheap::ctty_on_hold): Remove conditionalized variable.Christopher Faylor
* dcrt0.cc (do_exit): Remove code which handled CYGWIN=tty style ttys. * devices.in: Remove "/dev/ttym". * dtable.cc: Rename tty to pty where appropriate throughout. (dtable::stdio_init): Use new t->is_console rather than using now-deleted hwnd element in tty structure. (dtable::init_std_file_from_handle): Remove code which handled CYGWIN=tty style ttys. (fh_alloc): Ditto. * fhandler.h: Rename tty to pty where appropriate. (fhandler_pty_common): Delete output_done_event, ioctl_request_event, ioctl_done_event. (fhandler_pty_master::setup): Delete argument. (fhandler_tty_master): Delete. (fhandler_union): Delete __tty_master. * fhandler_console.cc (use_tty): Delete. (fhandler_console::get_tty_stuff): Set is_console to true rather than calling sethwnd. (fhandler_console::send_winch_maybe): Remove CYGWIN=tty considerations. (fhandler_console::input_tcsetattr): Ditto. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Use new t->is_console rather than using now-deleted hwnd element in tty structure. * fhandler_tty.cc: Rename tty to pty where appropriate throughout. (tty_master): Delete. (process_input): Ditto. (process_output): Ditto. (process_ioctl): Ditto. (fhandler_tty_master::*): Ditto. (fhandler_pty_master::process_slave_output): Remove CYGWIN=tty considerations. (fhandler_pty_slave::open): Ditto for *_done_event. (fhandler_pty_slave::write): Ditto. (fhandler_pty_slave::ioctl): Ditto. (fhandler_pty_slave::fch_open_handles): Ditto. (fhandler_pty_slave::fch_set_sd): Ditto. (fhandler_pty_slave::fch_close_handles): Ditto. (fhandler_pty_common::close): Ditto. (fhandler_pty_master::setup): Ditto. Remove now-unneeded ispty parameter. (fhandler_pty_master::open): Reflect argument removal for tty::allocate. * select.cc: Rename tty to pty where appropriate throughout. * sigproc.cc (proc_subproc): Remove CYGWIN=tty considerations. * tty.cc (ttyslot): Accommodate CYGWIN=tty removal. (tty_list::init_session): Ditto. (tty_list::attach): Ditto. (tty::create_master): Delete. (tty_list::terminate): Ditto. (tty_list::allocate): Delete "with_console" parameter. Remove CYGWIN=tty considerations. (tty::init): Set is_console = false. Use 'false' for was_opened since it is a boolean. * tty.h (*_{DONE,REQUEST}_EVENT): Delete. (tty_min::is_console): Declare new field which replaces hwnd. (tty_min::gethwnd): Delete. (tty_min::sethwnd): Ditto. (tty_list::allocate): Delete parameter. (tty_list::terminate): Delete declaration. * include/sys/cygwin.h (PID_USETTY): Redefine to PID_UNUSED1 and change comment to reflect its availability.
2011-06-14* mingw: Force use of bash.Christopher Faylor
2011-06-14* fhandler_tty_slave.cc (fhandler_tty_slave::fhandler_tty_slave): RevertChristopher Faylor
previous change since unit 0 is perfectly valid.
2011-06-13Rename FH_BAD to FH_NADA throughout.Christopher Faylor
* devices.h (FH_ERROR): New value. (iscons_dev): Extend to detect all the console device types. * devices.in: Set aside storage for FH_ERROR. * dtable.cc (dtable::init_std_file_from_handle): Use iscons_dev to detect when device is a console. (fh_alloc): Pass device to console constructor. (build_fh_pc): Short circuit when we detect that the constructor saw an error. * fhandler.h (fhandler_console::fhandler_console): Accept fh_devices parameter. (get_tty_stuff): Change to void. * fhandler_console (fhandler_console::set_unit): Set device to FH_ERROR on attempt to access anything other than the current console. (fhandler_console::get_tty_stuff): Change to void return. (fhandler_console::open): Return EPERM on FH_ERROR device type. (fhandler_console::fhandler_console): Set the device type appropriately before calling get_tty_stuff and rely on that function to reset it if necessary.
2011-06-10* environ.cc (create_upcaseenv): Delete.Christopher Faylor
(ucenv): Don't honor create_upcaseenv. (environ_init): Remove early retrieval of CYGWIN environment variable. Change comment to reflect new behavior.
2011-06-10* child_info.h (CURR_CHILD_INFO_MAGIC): Reset.Christopher Faylor
(child_info::old_title): Delete. (child_info::~child_info_spawn): Remove recording of old_title. * dcrt0.cc (title_buf): Delete. (child_info_spawn::handle_spawn): Remove recording of old_title. (dll_crt0_1): Get rid of all title handling. (do_exit): Ditto. * environ.cc (known): Delete strip_title and title. * fhandler_console.cc (fhandler_console::write): Remove recording of old_title. * globals.cc (exit_states): Remove ES_TITLE. (display_title): Delete. (strip_title_path): Delete. (old_title): Delete. * spawn.cc (spawn_guts): Remove old_title accommodation.
2011-06-09* environ.cc (envcache): Delete.Christopher Faylor
(known): Remove envcache. (getwinenv): Don't honor envcache setting.
2011-06-09* environ.c: Move code earlier to allow:Christopher Faylor
(_addenv): Call parse_options() when CYGWIN environment variable is being changed. (parse_options): Change parameter to 'const'.
2011-06-08* environ.cc (tty_is_gone): Add missing space to message.Christopher Faylor
2011-06-08* environ.cc (settings::set_process_state): Delete.Christopher Faylor
(tty_is_gone): New function. (known): Change "tty" to call tty_is_gone(). Remove unneeded '&' from beginning of function address. (parse_options): Remove set_process_state handling. * shared_info.h (CURR_USER_MAGIC): Reset. (user_info::warned_notty): New member.
2011-06-08* fhandler_console.cc (fhandler_console::open_shared_console): Semi-revert toChristopher Faylor
using fixed location for console stuff. * shared.cc (offsets): Ditto. Comment. * shared_info (shared_locations): Re-add SH_SHARED_CONSOLE.
2011-06-06whitespace eliminationChristopher Faylor
2011-06-06* fhandler_disk_file.cc (fhandler_disk_file::pread): Reset windows fileChristopher Faylor
position pointer back to previous location after successful read.
2011-06-05* fhandler_console.cc (fhandler_console::open_shared_console): Don't zeroChristopher Faylor
handle to open_shared since it is supposed to be an input. (enum_windows): Set handle input to open_shared to NULL since it does not represent any previously opened shared region. * shared.cc (open_shared): Tweak debugging output.
2011-06-04* ntdll.h (FILE_PIPE_*): Define constants.Christopher Faylor
* select.cc (pipe_data_available): Detect closing state.
2011-06-04* pinfo.cc (_pinfo::set_ctty): Don't reset myself->{pgid,sid} if terminal hasChristopher Faylor
no pgid or sid settings.
2011-06-04* fhandler.cc (fhandler_base_overlapped::wait_overlapped): Only raise SIGPIPEChristopher Faylor
when writing. * fhandler.h: Include "tty.h". (fhandler_termios::_tc): Rename from tc. (fhandler_termios::tc): New method. (fhandler_termios::tcinit): Remove an argument. (fhandler_termios::get_ttyp): Use method to retrieve value. (fhandler_console::console_state): Move here. (fhandler_console::dev_state): Delete. (fhandler_console::shared_console_info): Define. (fhandler_console::open_shared_console): Move this function under fhandler_console umbrella. (fhandler_console::tc): Define. Return static value. (fhandler_console::focus_aware): Accommodate deletion of dev_state. (fhandler_console): Add tty_list::get_cttyp as a friend. * fhandler_console.cc (dev_state): Redefine as a pointer within shared_console_info and change dev-> to dev. throughout. (fhandler_console::shared_console_info): Move into fhandler_console. (fhandler_console::open_shared_console): Move into fhandler_console change argument to simple bool. (enum_windows): Accommodate changes to console_state and open_shared_console. (console_unit::console_unit): Ditto. (fhandler_console::get_tty_stuff): Accommodate change to dev_state. (tty_list::get_cttyp): Accommodate change to handler_console::shared_console_info. (fhandler_console::read): Accommodate change from tc to tc (). (fhandler_console::set_input_state): Ditto. (fhandler_console::open): Accommodate tcinit argument change and change from tc to tc(). (fhandler_console::input_tcsetattr): Accomodate change from tc to tc(). (fhandler_console::input_tcsetattr): Ditto. (fhandler_console::write_normal): Ditto. (fhandler_console::init): Ditto. (fhandler_console::igncr_enabled): Ditto. * fhandler_termios.cc (fhandler_termios::tcinit): Remove first argument. Expect tc() to have been set up first. Use tc() rather than tc. (fhandler_termios::tcsetpgrp): Accomodate change from tc to tc(). (fhandler_termios::tcgetpgrp): Ditto. (fhandler_termios::bg_check): Ditto. (fhandler_termios::line_edit: Ditto. (fhandler_tty_master::set_winsize): Ditto. (fhandler_tty_slave::open): Ditto. (fhandler_tty_slave::init): Ditto. (fhandler_pty_master::write): Ditto. (fhandler_pty_master::setup): Ditto. Accommodate change in arguments to tcinit. (fhandler_tty_slave::fch_open_handles): Set _tc directly. (tty_min::is_orphaned_process_group): Don't assume that parent pid exists. * pinfo.cc (_pinfo::set_ctty): Reset myself->{pgid,sid} here if we were started by a non-Cygwin process but the tty exists. * shared_info.h (console_state): Delete from here. * tty.h: Make multiple inclusion safe.
2011-06-01* exceptions.cc (ctrl_c_handler): Simplify test for no parent tty.Christopher Faylor
* fhandler_console.cc (fhandler_console::get_tty_stuff): Return NULL if ctty is not tty/console. Improve test for slave tty/pty device.
2011-06-01* external.cc (fillout_pinfo): Don't truncate ctty if it's < 0.Christopher Faylor
* select.cc (pipe_data_available): Avoid printing debug info by default or suffer very large strace files.
2011-06-01* select.cc (pipe_data_available): New function - uses NtQueryInformationFileChristopher Faylor
to return information about pipes. (peek_pipe): Rewrite to use pipe_data_available for both read and write tests.
2011-06-01Correct checking for short option matches in getopt_long_only().Keith Marshall
2011-05-31* dtable.cc (dtable::select_write): Add missing argument to debug_printf.Christopher Faylor
* fhandler.cc (fhandler_base_overlapped::setup_overlapped): Explicitly set io_pending to false. (fhandler_base_overlapped::has_ongoing_io): Call GetOverlappedResult to force completion of I/O. (fhandler_base_overlapped::wait_overlapped): Rewrite to correctly deal with nonblocking reads and to make more race proof. (fhandler_base_overlapped::raw_write): Deal with new enum values. (fhandler_base_overlapped::raw_read): Ditto. Don't deal with ongoing I/O here since it makes no sense in the read context. * fhandler.h (enum wait_return): Add overlapped_unknown, overlapped_nonblocking_no_data. * pipe.cc (pipe): Add debugging output.
2011-05-30* dll_init.cc (dll_list::append): Eliminate increment of unused tot variable.Christopher Faylor
* dll_init.h (dll_list::tot): Delete. (dll_list::populate_all_deps): Delete undefined function. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Move EPIPE handling under error condition.
2011-05-30* dll_init.cc (reserve_upto): Remove.Christopher Faylor
(release_upto): Ditto. (dll_list::reserve_space): New function to reserve space needed by DLL_LOAD dlls early in the fork process. (dll_list::load_after_fork): Rewrite to use recursion to track reservations it makes while trying to make dlls land where they belong. (dll_list::load_after_fork_impl): New function used by load_after_fork. (dll_list::alloc): Initialize image base field. * dll_init.h (dll_list::prefered_base): New field. (dll_list::reserve_space): Declare new function. (dll_list::load_after_fork): Declare new function. * fork.cc (frok::child): call dll_list::reserve_space early, so we can retry if it fails.
2011-05-30* fhandler_termios.cc (fhandler_termios::bg_check): Do not return EIO when aChristopher Faylor
process group has no leader as this is allowed and does not imply an orphaned process group. Add a test for orphaned process groups. (tty_min::is_orphaned_process_group): Define new function. * tty.h (tty_min::is_orphaned_process_group): Define new function.
2011-05-30* dll_init.cc (dll_list::find_by_modname): New function to search the dll listChristopher Faylor
for a module name only (no path). (dll_list::alloc): Initialize newly-added members of struct dll. (dll_list::append): New function to factor out the append operation (used by dll_list::topsort). (dll_list::populate_deps): New function to identify dll dependencies. (dll_list::topsort): New function to sort the dll list topologically by dependencies. (dll_list::topsort_visit): New helper function for the above. * dll_init.h (dll::ndeps): New class member. (dll::deps): Ditto. (dll::modname): Ditto. (dll_list::find_by_modname): New function related to topsort. (dll_list::populate_all_deps): Ditto. (dll_list::populate_deps): Ditto. (dll_list::topsort): Ditto. (dll_list::topsort_visit): Ditto. (dll_list::append): Ditto. (pefile): New struct allowing simple introspection of dll images. * fork.cc (fork): Topologically sort the dll list before forking * child_info.h (CURR_CHILD_INFO_MAGIC): Refresh. (child_info::refresh_cygheap): New function. * spawn.cc (spawn_guts): Call refresh_cygheap before creating a new process to ensure that cygheap_max is up-to-date. * fork.cc (frok::parent): Ditto.
2011-05-30* cygheap.cc (cygheap_dummy): Rename from cygheap_at_start.Christopher Faylor
(cygheap): Accommodate name change to cygheap_dummy. (cygheap_init): Ditto. (cygheap_fixup_in_child): Simplify slightly. * fork.cc (fork): Add an advisory comment.