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
AgeCommit message (Collapse)Author
2009-06-15* errno.cc (errmap): Add mapping for ERROR_IO_INCOMPLETE.Christopher Faylor
* fhandler.cc (fhandler_base::fcntl): Fix comment. (fhandler_base::wait_overlapped): Accept an optional len parameter. Use the len parameter when WriteFile fails with ERROR_IO_PENDING. Make debug output less alarming. (fhandler_base::write_overlapped): Pass len to wait_overlapped. * fhandler.h (fhandler_base::wait_overlapped): Add an optional argument denoting the number of characters intended to be written. * fhandler_tty.cc (fhandler_pty_master::close): Don't close archetype handles when cygwin is still initializing since the handles aren't actually opened at that point.
2009-05-06* fhandler_console.cc (fhandler_console::ioctl): Properly treat TIOCLINUXChristopher Faylor
argument as a char. * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly set char value.
2009-01-21ChangeLog:Corinna Vinschen
* configure.in: Remove --enable-server option. Allways add the cygserver directory to $SUBDIRS. * configure: Regenerate. cygwin/ChangeLog: Remove USE_SERVER define. Accommodate throughout. * configure.in: Remove --enable-server option. * configure: Regenerate. * environ.cc: Remove CYGWIN=server setting. cygserver/ChangeLog: * client.cc (allow_server): Remove variable. (client_request_get_version::client_request_get_version): Drop checking allow_server. utils/ChangeLog: * passwd.c: Remove CYGWIN=server requirement from usage text. doc/ChangeLog: * cygserver.sgml: Remove the "How to use the Cygserver services" section. * cygwinenv.sgml: Move "(no)server" to the removed options section. * faq-programming.xml: Remove CYGWIN=server requirement for running the Cygwin testsuite. * ntsec.sgml: Ditto for using `passwd -R'.
2008-08-28* fhandler_tty.cc (close_maybe): Check for both types of invalid handle beforeChristopher Faylor
attempting CloseHandle. (fhandler_pty_master::setup): Only set inheritance on pty handles, not tty handles.
2008-07-26* fhandler_tty.cc (fhandler_pty_master::setup): Reorganize so that allChristopher Faylor
operations for each end of the pipe are grouped together.
2008-06-19 * fhandler_tty.cc (fhandler_pty_master::setup): Fix pipe inheritance.Corinna Vinschen
2008-04-07Remove unneeded header files from source files throughout.Christopher Faylor
2008-04-01 * Fix copyright dates.Corinna Vinschen
2008-03-23* dtable.cc: Define various device-related string constants as wide characterChristopher Faylor
constants. (dtable::init_std_file_from_handle): Reorganize pipe handling to try to catch special tty case. (build_fh_name_worker): Declare for common use. (build_fh_name): Define char version. (build_fh_name): Define (currently unused) UNICODE_STRING version. (decode_tty): Detect if pipe is actually a cygwin tty, returning the tty name in the buffer. (handle_to_fn): Reorganize to use wide characters. * dtable.h (build_fh_name): Declare (currently unused) UNICODE_STRING version. * fhandler_tty.cc (fhandler_pty_master::setup): Use fhandler_pipe::create_selectable to create a pipe with a given name. * pipe.cc (pipe_handler): Make returned handle inheritable. (fhandler_pipe::create_selectable): Take an optional name. Use a standard cygwin introducer for the name. * path.cc (path_conv::check): Make first argument const. * path.h (path_conv::check): Ditto for declaration. (path_conv::path_conv): Ditto for UNICODE_STRING version.
2008-02-07 * dtable.cc (dtable::init_std_file_from_handle): Set access toCorinna Vinschen
read/write of handle is connected to a tty or console. * fhandler_dsp.cc (fhandler_dev_dsp::dup): Set open flags correctly after duplicating from archetype. * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto. (fhandler_pty_master::dup): Ditto.
2007-12-05 * fhandler_tty.cc (fhandler_tty_slave::open): Use MAX_PATH instead ofCorinna Vinschen
CYG_MAX_PATH for event name buffer size. (fhandler_pty_master::setup): Use MAX_PATH instead of CYG_MAX_PATH for mutex name buffer size. * netdb.cc: Drop old comment. (open_system_file): Set path buffer size to MAX_PATH instead of CYG_MAX_PATH. Drop conversion to posix path. Open file using win32 path. Fix typo in ChangeLog.
2007-11-28 * fhandler_tape.cc (mtinfo::initialize): Use MAX_PATH instead ofCorinna Vinschen
CYG_MAX_PATH. * fhandler_tty.cc (fhandler_pty_master::ptsname): Set buffer size to TTY_NAME_MAX. * syscalls.cc (ttyname): Eliminate the `+ 1' from the name buffer size since TTY_NAME_MAX already counts the trailing NUL. * libc/bsdlib.cc (openpty): Set pts buffer size to TTY_NAME_MAX.
2007-11-27Change many cygheap allocation routines to their *_abort analogs.Christopher Faylor
* cygheap.cc (cmalloc_abort): New function. (crealloc_abort): Ditto. (ccalloc_abort): Ditto.
2007-02-23 Throughout remove all usage of wincap.has_security.Corinna Vinschen
* environ.cc (environ_init): Drop setting allow_ntsec here. * grp.cc (initgroups32): Drop usage of label "out". * security.cc (allow_ntsec): Set to true by default. * syscalls.cc (seteuid32): Remove label success_9x. * wincap.cc: Remove has_security throughout. * wincap.h: Ditto.
2006-07-17GCC 4.1 fixes.Christopher Faylor
* cygheap.h (cygheap_user): Remove unneeded class names from function declaration. * fhandler.h (fhandler_base): Ditto. (fhandler_dev_floppy): Ditto. (fhandler_console): Ditto. * wininfo.h (wininfo): Ditto. * exceptions.cc (sigpacket::process): Avoid compiler errors about gotos and initialization. * fhandler_fifo.cc (fhandler_fifo::open): Ditto. * fhandler_floppy.cc (fhandler_dev_floppy::ioctl): Ditto. * fhandler_tty.cc (fhandler_tty_slave::ioctl): Ditto. * mmap.cc (mmap64): Ditto. * pipe.cc (fhandler_pipe::open): Ditto. * spawn.cc (spawn_guts): Ditto. * sec_helper.cc: Fix some comments. (get_null_sd): Move file-scope static to only function where it is used.
2006-07-03 * fhandler.h (class dev_console): Add `metabit' indicating theCorinna Vinschen
current meta key mode. * fhandler_console.cc (fhandler_console::read): Set the top bit of the character if metabit is true. * fhandler_console.cc (fhandler_console::ioctl): Implement KDGKBMETA and KDSKBMETA commands. * fhandler_tty.cc (process_ioctl): Support KDSKBMETA. (fhandler_tty_slave::ioctl): Send KDGKBMETA and KDSKBMETA to the master. * include/cygwin/kd.h: New file for the meta key mode. * include/sys/kd.h: New file.
2006-06-12* fhandler_tty.cc (fhandler_pty_master::close): Always closeChristopher Faylor
from_master/to_master since we always have copies of these handles.
2006-06-04* cygthread.cc (cygthread::terminate_thread): In debugging output, use name ofChristopher Faylor
thread being terminated rather than thread doing terminating. * fhandler.h (fhandler_pty_master::slave): Delete. (fhandler_pty_master::get_unit): Ditto. (fhandler_pty_master::setup): Change argument declaration to accommodate new usage. * fhandler_tty.cc (fhandler_tty_master::init): Remove obsolete slave assignment. Pass argument to setup indicating that this is a tty. (fhandler_tty_slave::open): Use dev() method rather than referencing pc.dev directly. (fhandler_pty_master::open): Don't create archetype based on ptym device number. Set device number to use DEV_TTYM_MAJOR and tty number. Pass argument to setup indicating that this is a pty. (fhandler_pty_master::setup): Change single argument to a flag indicating whether we're creating a pty and use appropriately. Calculate 't' variable here rather than in caller. * fhandler_dsp.cc (fhandler_dev_dsp::open): Use dev() method rather than referencing pc.dev directly.
2006-06-04* dcrt0.cc (dll_crt0_0): Call tty_list::init_session here.Christopher Faylor
(dll_crt0_1): Reflect renaming from tty_init to tty::init_session. (do_exit): Reflect moving of tty_terminate into tty_list. * exceptions.cc (events_init): Move tty_mutex stuff elsewhere. * fhandler_console.cc (set_console_title): Use lock_ttys class. * fhandler_termios.cc (fhandler_termios::bg_check): Make debug output more accurate. * fhandler_tty.cc (fhandler_tty_slave::open): Reflect move of attach_tty into tty_list class. Don't attempt to grab master end of pty if master doesn't exist. (fhandler_pty_master::open): Reflect move of allocate_tty into tty_list class. Use lock_ttys::release to release mutex. Improve debugging output. (fhandler_pty_master::setup): Remove if 0'ed block. Fix argument to SetNamedPipeHandleState. * pinfo.cc (_pinfo::set_ctty): Lock ttys before setting sid/pgid. Improve debugging. Add temporary debugging. * tty.cc (tty_list::init_session): New function. (tty::init_session): Rename from tty_init. Reflect move of attach_tty to tty_list class. (tty::create_master): Rename from create_tty_master. (tty_list::attach): Rename from attach_tty. Reflect renaming of connect_tty to connect. Ditto for allocate_tty. (tty_terminate): Delete. (tty_list::terminate): Subsume tty_terminate. Use lock_ttys rather than manipulating mutex directly. (tty_list::allocate): Rename from allocate_tty. Use lock_ttys rather than manipulating mutex directly. Don't set sid here since linux apparently doesn't do this. Reflect move of create_tty_master into tty. (lock_ttys::lock_ttys): Define new constructor. (lock_ttys::release): New function. * tty.h (tty::exists): Return false immediately if !master_pid. (tty::set_master_closed): Define new function. (tty::create_master): Ditto. (tty::init_session): Ditto. (tty_list::mutex): New field. (tty_list::allocate): Define new function. (tty_list::connect): Ditto. (tty_list::attach): Ditto. (tty_list::init_session): Ditto. (lock_ttys): New class. (tty_init): Delete declaration. (tty_terminate): Ditto. (attach_tty): Ditto. (create_tty_master): Ditto.
2006-06-03* fhandler_tty.cc (fhandler_pty_master::close): Don't close handles if we don'tChristopher Faylor
own them. (fhandler_pty_master::setup): Make sure that original handle is closed when changing inheritance. (fhandler_pty_master::fixup_after_fork): Set from_master/to_master to arch value always. (fhandler_pty_master::fixup_after_exec): Clear from_master/to_master when close_on_exec.
2006-06-03* cygheap.cc (init_cygheap::close_ctty): Remove obsolete code.Christopher Faylor
* dcrt0.cc (child_info_spawn::handle_spawn): Signal ready after we've run fixup_after_exec. * dtable.cc (dtable::fixup_after_exec): Add debugging output. * fhandler_tty.cc (fhandler_pty_master::doecho): Use class version of to_master. (fhandler_tty_common::close): Remove obsolete code. (fhandler_tty_slave::fixup_after_exec): Don't close, since this is done in dtable's fixup_after_exec. (revisit later?) (fhandler_pty_master::fixup_after_exec): Ditto.
2006-06-02* fhandler.cc (fhandler_base::fixup_after_exec): Declare here.Christopher Faylor
* fhandler.h (fhandler_base::fixup_after_exec): Make non-inline. (fhandler_termios::fixup_after_fork): Delete declaration. (fhandler_termios::fixup_after_exec): Ditto. (fhandler_tty_common::inuse): Remove. (fhandler_tty_common::dup): Delete declaration. (fhandler_tty_common::fixup_after_fork): Ditto. (fhandler_tty_slave::fixup_after_exec): Declare new function. (fhandler_pty_master::dwProcessId): New variable. (fhandler_pty_master::from_master): Ditto. (fhandler_pty_master::to_master): Ditto. (fhandler_pty_master::setup): New function. (fhandler_pty_master::fixup_after_fork): Ditto. (fhandler_pty_master::fixup_after_exec): Ditto. * fhandler_termios.cc (fhandler_termios::fixup_after_exec): Delete definition. (fhandler_termios::fixup_after_fork): Ditto. * fhandler_tty.cc (fhandler_tty_master::init): Use fhandler_pty_master setup function rather than obsolete tty::common_init. Delete obsolete inuse setting. (fhandler_tty_slave::fhandler_tty_slave): Set inuse to NULL here. (fhandler_tty_slave::open): Change debugging output for clarity. Check for different things when doing a sanity check on the tty. Reflect the fact that master_pid now is the cygwin pid rather than the windows pid. Use "arch" rather than "archetype" for consistency. (fhandler_tty_slave::close): Close inuse here. (fhandler_tty_slave::dup): Remove old if 0'ed code. (fhandler_pty_master::dup): New function. Handles pty master archetype. (fhandler_pty_master::fhandler_pty_master): Zero pty_master specific fields. (fhandler_pty_master::open): Implement using archetypes, similar to slave. Use fhandler_pty_master setup function rather than obsolete tty::common_init. Don't set inuse. (fhandler_tty_common::close): Don't deal with inuse. Delete old if 0'ed code. (fhandler_pty_master::close): Implement using archetypes. Close from_master and to_master. (fhandler_tty_common::set_close_on_exec): Just set close_on_exec flag here since everything uses archetypes now. (fhandler_tty_common::fixup_after_fork): Delete definition. (fhandler_tty_slave::fixup_after_exec): Define new function. (fhandler_pty_master::setup): New function, derived from tty::common_init. (fhandler_pty_master::fixup_after_fork): New function. (shared_info.h): Reset SHARED_INFO_CB to reflect new tty size. * tty.cc (tty_list::terminate): Close individual handles from tty_master. (tty::master_alive): Delete. (tty::make_pipes): Ditto. (tty::common_init): Ditto. * tty.h (tty::from_slave): Delete. (tty::to_slave): Ditto. (tty::common_init): Delete declaration. (tty::make_pipes): Ditto. (tty::master_pid): Define as pid_t since it is now a cygwin pid.
2006-05-22* child_info.h (_CI_SAW_CTRL_C): New enum.Christopher Faylor
(CURR_CHILD_INFO_MAGIC): Reset. (saw_ctrl_c): New function. (set_saw_ctrl_c): Ditto. * sigproc.cc (child_info::proc_retry): Return EXITCODE_OK if we get STATUS_CONTROL_C_EXIT and we actually saw a CTRL-C. * spawn.cc (dwExeced): Delete. (chExeced): New variable. (spawn_guts): Set chExeced; * exceptions.cc (dwExeced): Delete declaration. (chExeced): Declare. (ctrl_c_handler): Detect if we're an exec stub process and set a flag, if so. * fhandler_tty.cc (fhandler_tty_common::__release_output_mutex): Add extra DEBUGGING test. * pinfo.cc: Fix comment.
2006-05-20* fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.Christopher Faylor
2006-05-20* fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to need_invisibleChristopher Faylor
on first pty open.
2006-03-18* child_info.h (CURR_CHILD_INFO_MAGIC): Regenerate.Christopher Faylor
(child_info::retry): Move here from fork subclass. (child_info::exit_code): New field. (child_info::retry_count): Max retry count for process start. (child_info::proc_retry): Declare new function. (child_info_fork::retry): Move to parent. (child_info_fork::fork_retry): Ditto. * dcrt0.cc (child_info::fork_retry): Rename and move. (child_info_fork::handle_failure): Move. (dll_crt0_0): Initialize console handler based on whether we have a controlling tty or not. Avoid nonsensical check for fork where it can never occur. * environ.cc (set_proc_retry): Rename from set_fork_retry. Set retry_count in child_info. (parse_thing): Reflect above change. * exceptions.cc (dummy_ctrl_c_handler): Remove unused variable name. (ctrl_c_handler): Always return TRUE for the annoying CTRL_LOGOFF_EVENT. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Remove call to init_console_handler. * fhandler_tty.cc (fhandler_tty_slave::open): Just call mange_console_count here and let it decide what to do with initializing console control handling. * fork.cc (fork_retry): Remove definition. (frok::parent): Define static errbuf and use in error messages (not thread safe yet). Close pi.hThread as soon as possible. Protect pi.hProcess as soon as possible. Don't set retry_count. That happens automatically in the constructor now. Accommodate name change from fork_retry to proc_retry. * init.cc (dll_entry): Turn off ctrl-c handling early until we know how it is supposed to be handled. * pinfo.cc (_pinfo::dup_proc_pipe): Remember original proc pipe value for failure error message. Tweak debug message slightly. * sigproc.cc (child_info::retry_count): Define. (child_info::child_info): Initialize retry count. (child_info::sync): Set exit code if process dies before synchronization. (child_info::proc_retry): Rename from child_info_fork::fork_retry. Use previously derived exit code. Be more defensive about what is classified as an error exit. (child_info_fork::handle_failure): Move here from dcrt0.cc. * spawn.cc (spawn_guts): Maintain error mode when starting new process to avoid annoying pop ups. Move deimpersonate call within new loop. Move envblock freeing to end. Loop if process dies prematurely with bad exit code. * syscalls.cc (init_console_handler): Remove hopefully unneeded call to init_console_handler.
2006-01-12copyrightChristopher Faylor
2006-01-09* fhandler_tty.cc (fhandler_tty_slave::dup): Don't assign a controllingChristopher Faylor
terminal to a process when duped. Linux doesn't do this, so we won't either.
2005-12-30* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Use straceChristopher Faylor
method rather than accessing field directly. (fhandler_tty_common::__release_output_mutex): Ditto.
2005-12-29*** cygwin DLL Changes:Christopher Faylor
* child_info.h (CURR_CHILD_INFO_MAGIC): Reset. (child_info::dwProcessId): Delete. (child_info::straced): New variable. (child_info::handle_fork): New member function. * dcrt0.cc (in_forkee): New global variable. (__cygwin_user_data::forkee): Mark as obsolete. (do_global_ctors): Use in_forkee rather than user_data->forkee. (get_cygwin_startup_info): Ditto. Deal with new straced field to allow strace to deal with children of attached processes. (initial_env): Accommodate changes to strace::hello. (child_info_fork::handle_fork): Rename from plain old 'handle_fork'. Move alloc_stack() call elsewhere. (dll_crt0_0): Fill out more of user_data. Reference handle_fork via fork_info. Add some debugging output. (_dll_crt0): Don't wait for sync thread if sync_startup is invalid. Zero sync_startup here. Call alloc_stack() here, if appropriate. (dll_crt0_1): Use in_forkee rather than user_data->forkee. (dll_crt0): Ditto. * malloc_wrapper.cc (malloc_init): Ditto. * dll_init.cc (in_forkee): Remove local static version of this variable. (dll_list::load_after_fork): Don't set in_forkee here. * external.cc (cygwin_internal): Use strace method rather than accessing field directly. * fhandler.cc (fhandler_base::read): Ditto. * fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto. * fork.cc (frok::parent): Invoke strace write_childpid to communicate with potential strace. (child_copy): Add more detail to debugging output. * init.cc (calibration_id): New static variable. (prime_threads): Set sync_startup to invalid handle if we already know about thread_func_ix. Use static calibration_id to hold calibration thread id. * munge_threadfunc (munge_threadfunc): Don't try to debug if we don't find threadfunc_ix. (dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on non-cygwin threads invoked during process startup. * pinfo.cc (set_myself): Always call strace.hello here regardless of DEBUGGING. * sigproc.cc (child_info::child_info): Remove spurious handling of dwProcessId. Set straced as appropriate. * spawn.cc (spawn_guts): Rename ciresrv to ch. Invoke strace write_childpid to communicate with potential strace. * strace.cc: Include child_info.h. (strace::hello): Remove inited test. Use active() method to test if strace has been activated. Handle case where we are started before (mypid): New function. (strace::vsprntf): Try to deal more intelligently with case where progname may not be filled out. Put pid in parentheses if it is a windows pid rather than a cygwin pid. myself has been filled out. (strace::write_childpid): New function for notifying strace about the creation of children. (strace::vprntf): Use strace method rather than accessing field directly. (strace_printf): Ditto. (strace::wm): Ditto. * winsup.h (in_forkee): Declare. * include/sys/strace.h (strace::write_childpid): Declare new function. (strace::attached): Define new function. (strace::active): Ditto. (strace::active_val): Ditto. (_STRACE_ON): Delete. (_STRACE_OFF): Ditto. (define_strace0): Use strace method rather than accessing field directly. (strace_printf_wrap): Ditto. (strace_printf_wrap1): Ditto. *** cygwin utils changes: * strace.cc (nprocesses): Make static global. (quiet): New variable. (strace_active): Ditto. (add_child): Increment nprocesses here. Don't add a child if it is already added (windows bug?). Report on child if not quiet. (get_child): Just return NULL if child not found. (remove_child): Report on child if not quiet. (attach_process): Don't complain if given a windows process. Use windows pid in error. (handle_output_debug_string): Issue error if trying to manipulate a process that we don't know about. Handle _STRACE_CHILD_PID - attach to reported child when we get this. (proc_child): Move nprocesses to file scope. Report on exceptions. (longopts): Implement "--quiet". (opts): Implement "-q". (main): Manipulate quiet flag. * utils.sgml (strace): Add words describing '-q'.
2005-12-19* fhandler.h (fhandler_pipe::fixup_in_child): Declare new function.Christopher Faylor
(fhandler_console::invisible_console): Declare new variable. (fhandler_console::need_invisible): Ditto. (fhandler_console::has_a): Ditto. * fhandler_console.cc (set_console_state_for_spawn): Eliminate return value. Set up an invisible console if necessary prior to spawning. (fhandler_console::invisible_console): Define. * fhandler_tty.cc (fhandler_tty_slave::open): Use fhandler_console::invisible_console to setup an invisible console. * pipe.cc (fhandler_pipe::fixup_in_child): Define new function from fixup_after_exec. (fhandler_pipe::fixup_after_exec): Use fixup_in_child when appropriate. (fhandler_pipe::fixup_after_fork): Ditto. * spawn.cc (handle): Reorganize and modernize a little. (spawn_guts): Rely on set_console_state_for_spawn to set the console into the right state but don't create the process with "detached" flag if we have no controlling tty since that confuses 'cmd'. * dtable.cc (dtable::stdio_init): Don't set console as controlling terminal if we have an invisible console. * sigproc.cc (child_info::sync): Use correct name in ForceCloseHandle1.
2005-12-13* fhandler_tty.cc (fhandler_tty::open): Enhance comment.Christopher Faylor
2005-12-13 * fhandler_tty.cc (fhandler_tty::open): Close newly created windowCorinna Vinschen
station after switching to original window station.
2005-12-13* fhandler_tty.cc (fhandler_tty::open): Add a comment.Christopher Faylor
2005-12-13* times.cc (systime): Correct precision referenced in comment.Christopher Faylor
* fhandler_tty.cc (fhandler_tty_slave::open): Don't free original windows station since that will cause strange problems displaying fonts. Reset windows station to original station after creating console. * times.cc (hires_ms::usecs): Only reprime when calculated time is less than system time.
2005-11-24* fhandler_tty.cc (fhandler_tty_slave::open): Reset the current windows stationChristopher Faylor
whenever ctty == -1 regardles of whetehr there's a windows station already assigned. Close the old windows station in this situation. * pinfo.cc (_pinfo::set_ctty): Reinstate incrementing of console count when recording ctty so that the current tty is always around.
2005-11-17 * fhandler_tty.cc (fhandler_tty_slave::open): Don't expect thatCorinna Vinschen
service applications have no window station attached.
2005-11-14* fhandler.h (fhandler_console::fixup_after_fork_exec): Declare new function.Christopher Faylor
(fhandler_console::fixup_after_fork): Use fixup_after_fork_exec. (fhandler_console::fixup_after_exec): Ditto. * fhandler_console.cc (fhandler_console::fixup_after_fork): Delete definition. (fhandler_console::fixup_after_fork_exec): Rename from fixup_after_exec. * pinfo.cc (_pinfo::set_ctty): Don't play with console count here. * syscalls.cc (close_all_files): Don't close cygheap ctty if hExeced since the child will be copying information from us. (setsid): Use myctty() rather than raw ctty #.
2005-11-14* cygheap.h (init_cygheap::manage_console_count): Declare new function.Christopher Faylor
(init_cygheap::console_count): Renamed from open_fhs. Make private. * cygheap.cc (init_cygheap::manage_console_count): Define new function. * dtable.cc (dtable::fixup_after_exec): Always call fixup_after_exec on elements of fd even when they are about to be closed. * fhandler.h (report_tty_counts): Remove open_fhs from debugging output. * fhandler_console.cc (fhandler_console::open): Use manage_console_count rather than manipulating count directly. (fhandler_console::close): Ditto. (fhandler_console::fixup_after_fork): Ditto. (fhandler_console::fixup_after_exec): Ditto. Don't close handles if close_on_exec. * fhandler_tty.cc (fhandler_tty_slave::open): Use manage_console_count() rather than manipulating count directly. Reflect change in arguments to report_tty_counts(). (fhandler_tty_slave::close): Ditto for both. (fhandler_tty_slave::dup): Ditto for both. (fhandler_tty_slave::ioctl): Use myctty() rather than raw ctty #. (fhandler_tty_slave::fixup_after_fork): Reflect change in arguments to report_tty_counts(). (fhandler_tty_master::init_console): Use manage_console_count() rather than manipulating count directly. * fhandler_clipboard.cc (fhandler_dev_clipboard::fixup_after_exec): Don't perform any operations if close_on_exec. * fhandler_dsp.cc (fhandler_dev_dsp::fixup_after_exec): Ditto. * fhandler_raw.cc (fhandler_dev_raw::fixup_after_exec): Ditto. * fhandler_serial.cc (fhandler_serial::fixup_after_exec): Ditto. * pinfo.h (_pinfo::_ctty): Declare new function. (myctty): Declare new macro. (__ctty): Declare new macro. * pinfo.cc (_pinfo::_ctty): Define new function. (_pinfo::set_ctty): Use manage_console_count() rather than manipulating count directly. * signal.cc (kill_pgrp): Use myctty() and __ctty() macros rather than raw ctty #. * syscalls.cc (setsid): Ditto. Use manage_console_count() rather than manipulating count directly.
2005-10-18Change process_lock to lock_process throughout. Change all calls to newChristopher Faylor
cygthread to handle extra argument, throughout. * cygthread.h (cygthread::callproc): Declare new method. (cygthread::cygthread): Add optional length argument to allow copying arguments to executing thread. * cygthread.cc (cygthread::callproc): Define new method. (cygthread::stub): Use callfunc to invoke thread func to allow potentially allocating stack memory which will be returned. (cygthread::simplestub): Ditto. (cygthread::cygthread): Accept arglen argument. Reset ev here prior to activating thread. Wait for ev after activating thread if we're copying contents to the thread. Wait until the end before setting h, to allow thread synchronization. (cygthread::release): Don't reset ev here. Rely on that happening the next time the thread is activated. * pinfo.h (commune_process): Rename declaration from _pinfo::commune_process. * pinfo.cc (commune_process): Ditto for definition. Modify slightly to allow running as a separate cygthread. * sigproc.cc (child_info::sync): Always wait for both subproc_ready and any hProcess if we have a cygwin parent. (talktome): Change argument to be a pointer to siginfo_t. Contiguously allocate whole siginfo_t structure + any needed extra for eventual passing to commune_process thread. (wait_sig): Accommodate change in talktome argument. * pipe.cc (fhandler_pipe::fixup_after_exec): Remove debugging.
2005-09-28 Revert erroneous checkin.Corinna Vinschen
2005-09-28 * fhandler.h (class fhandler_dev_raw): Delete current_position andCorinna Vinschen
eof_detected status flag. Delete is_eom and is_eof methods. Move drive_size, bytes_per_sector, eom_detected status flag, as well as the methods read_file, write_file, raw_read and raw_write to ... (class fhandler_dev_floppy): ... here. Remove is_eom and is_eof methods. Add dup method. * fhandler_floppy.cc (IS_EOM): New macro. (fhandler_dev_floppy::is_eom): Remove. (fhandler_dev_floppy::is_eof): Remove. (fhandler_dev_floppy::fhandler_dev_floppy): Initialize status flags. (fhandler_dev_floppy::get_drive_info): Only call EX functions on systems supporting them and stop suffering strange delays. (fhandler_dev_floppy::read_file): Move here, drop setting current_position. (fhandler_dev_floppy::write_file): Move here, drop setting current_position. (fhandler_dev_floppy::open): Rearrange comment. (fhandler_dev_floppy::dup): New method. (fhandler_dev_floppy::get_current_position): New inline method. Use instead of former current_position were appropriate. (fhandler_dev_floppy::raw_read): Move here. Drop EOF handling. (fhandler_dev_floppy::raw_write): Move here. Drop EOF handling. (fhandler_dev_floppy::lseek): Remove useless conditions. Convert sector_aligned_offset to LARGE_INTEGER to improve SetFilePointer call. (fhandler_dev_floppy::ioctl): Move blocksize check in RDSETBLK case to here. * fhandler_raw.cc (fhandler_dev_raw::is_eom): Remove. (fhandler_dev_raw::is_eof): Remove. (fhandler_dev_raw::write_file): Remove. (fhandler_dev_raw::read_file): Remove. (fhandler_dev_raw::raw_read): Remove. (fhandler_dev_raw::raw_write): Remove. (fhandler_dev_raw::dup): Drop copying removed members. (fhandler_dev_raw::ioctl): Drop blocksize testing. * wincap.h: Implement has_disk_ex_ioctls throughout. * wincap.cc: Ditto. (wincap_vista): Preliminary wincaps for Windows Vista/Longhorn. (wincapc::init): Add Vista/Longhorn handling.
2005-09-14Remove some more unneeded 'return;'s throughout.Christopher Faylor
2005-08-19* fhandler.h (fhandler_tty_common::lseek): Declare new method.Christopher Faylor
(fhandler_tty_slave::lseek): Delete old method. (fhandler_tty_master::lseek): Delete old method. * fhandler_tty.cc (fhandler_tty_common::lseek): Define new method.
2005-08-17* dcrt0.cc (dll_crt0_1): Tweak debugging stuff.Christopher Faylor
* fhandler_tty.cc (fhandler_tty_common::close): Rearrange the code so that the master end of the input and output pipes is closed before signalling an EOF event to the slave. (fhandler_pty_master::close): Likewise.
2005-08-05 * fhandler_tty.cc (fhandler_tty_slave::tcflush): Return either 0 or -1.Corinna Vinschen
2005-07-07Eliminate (void) cast on standalone function calls throughout.Christopher Faylor
2005-07-05Change foo (void) to foo () for all c++ functions throughout. Remove allChristopher Faylor
fhandler_*::dump functions throughout. * fhandler.h (fhandler_dev_mem::close): Remove pass-through function in favor of virtual method. (handler_dev_raw::close): Ditto. (fhandler_dev_clipboard::fixup_after_exec): New method. * fhandler_dev_mem.cc (fhandler_dev_mem::close): Eliminate pass through * fhandler_dev_raw.cc (fhandler_dev_raw::close): Ditto. * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Don't go to extra effort when execing. (fhandler_dev_clipboard::fixup_after_exec): New function. * fhandler_console.cc (fhandler_console::close): Don't do "extra stuff" when we know we're execing. * fhandler_disk_file.cc (fhandler_disk_file::close): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::close): Ditto. * fhandler_fifo.cc (fhandler_fifo.cc::close): Ditto. function in favor of base function. * fhandler_random.cc (fhandler_dev_random::close): Ditto. * fhandler_registry.cc (fhandler_registry::close): Ditto. * fhandler_tty.cc (fhandler_tty_slave::close): Ditto. * fhandler_virtual.cc (fhandler_virtual::close): Ditto. * pinfo.cc (proc_waiter): Remove unneeded hExeced declaration. * sigproc.cc: Ditto. * winsup.h (hExeced): Define here. * fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Just call close() to reinitialize things to known state.
2005-06-30* cygerrno.h: Make multi-inclusion safe.Christopher Faylor
* fhandler_termios.cc (fhandler_termios::tcsetpgrp): Deal with EINTR. * dcrt0.cc (dll_crt0_0): Accommodate init_console_handler argument change. * winsup.h: Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * exceptions.cc (init_console_handler): Ditto. Ignore console events if we're not attached to a terminal. * fhandler_tty.cc (fhandler_tty_slave::open): Ditto. * wincap.cc: Implement has_null_console_handler_routine throughout. * wincap.h: Ditto.
2005-05-29* fhandler_tty.cc (fhandler_tty_slave:tcflush): Use signed comparison.Christopher Faylor