summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * fhandler.h (fhandler_console::send_winch_maybe): New method.Christopher Faylor2002-08-194-25/+45
| | | | | | | | | * fhandler_console.cc (set_console_state_for_spawn): Remove if 0'ed code. (fhandler_console::send_winch_maybe): Define new method. (fhandler_console::read): Use send_winch_maybe where appropriate. (fhandler_console::init): Just call all tcsetattr rather than output_tcsetattr. * select.cc (peek_console): Reorganize so that send_winch_maybe is called for everything but keyboard input.
* * perthread.h (vfork_save): Add ctty, sid, pgid, exitval fields.Christopher Faylor2002-08-189-19/+99
| | | | | | | | | | | | | | | | | (vfork_save::restore_pid): New method. (vfork_save::restore_exit): New method. * fork.cc (vfork): Save ctty, sid, pgid and restore them when returning to "parent". Use exitval field if exiting but never created a new process. * syscalls.cc (setsid): Detect when in "vfork" and force an actual fork so that pid will be allocated (UGLY!). (getsid): New function. * dcrt0.cc (do_exit): Use vfork_save::restore_exit method for returning from a vfork. * spawn.cc (spawnve): Use vfork_save::{restore_pid,restore_exit} methods for returning from vfork. * cygwin.din: Export getsid. * include/cygwin/version.h: Bump api minor number. * malloc.cc: #ifdef sYSTRIm for when MORECORE_CANNOT_TRIM is true.
* * cygmalloc.h (MORECORE_CANNOT_TRIM): Define.Christopher Faylor2002-08-182-1/+4
|
* * sigproc.cc (sigCONT): Define.Christopher Faylor2002-08-185-16/+32
| | | | | | | | | * sigproc.h (sigCONT): Declare. (wait_sig): Create sigCONT event here. * exceptions.cc (sig_handle_tty_stop): Wait for sigCONT event rather than stopping thread. (sig_handle): Set sigCONT event as appropriate on SIGCONT rather than calling ResumeThread.
* * malloc.cc: Update to 2.7.2.Christopher Faylor2002-08-183-10/+19
| | | | | * malloc_wrapper.cc (malloc_init): Call user level mallocs to determine if the malloc has been wrapped.
* fix typoChristopher Faylor2002-08-171-1/+1
|
* Missed this commit in last checkin.Christopher Faylor2002-08-161-74/+149
|
* * winsup.h: Remove malloc_*lock functions.Christopher Faylor2002-08-162-3/+4
|
* * Makefile.in: Add support for new malloc.o and renamed malloc_wrapper.o. UseChristopher Faylor2002-08-1610-31/+5661
| | | | | | | | | | | | | | | | | -fomit-frame-pointer for malloc.o compilation. * malloc_wrapper.cc: New file. Rename from malloc.cc. Add support for more malloc functions. Eliminate export_* calls. Just use straight malloc names. Remove unused argument from malloc lock functions. * cygwin.din: Just export straight malloc names. Add malloc_stats, malloc_trim, malloc_usable_size, mallopt, memalign, valloc. * dcrt0.cc (__cygwin_user): Eliminate export_* malloc entries. * fork.cc (fork_parent): Remove unused argument from malloc_lock argument. * malloc.cc: New file. Doug Lea's malloc v2.7.1. * cygmalloc.h: New file. * include/cygwin/version.h: Bump API_MINOR. * sync.h (muto::acquire): Use appropriate number for regparm attribute. (muto::reset): Ditto. (muto::release): Ditto.
* * exceptions.cc (interrupt_setup): Ensure that the previous signal mask isChristopher Faylor2002-08-162-1/+7
| | | | properly saved.
* * dcrt0.cc: Modify define for CYGWIN_GUARD.Christopher Faylor2002-08-152-2/+8
| | | | (alloc_stack_hard_way): Just use CYGWIN_GUARD in VirtualAlloc call.
* present tenseChristopher Faylor2002-08-151-21/+20
|
* make comment more accurate.Christopher Faylor2002-08-151-4/+4
|
* * fhandler.h (fhandler_socket::recv): Remove method.Conrad Scott2002-08-124-106/+28
| | | | | | | | | | | | | (fhandler_socket::send): Ditto. * fhandler_socket.cc (fhandler_socket::recv): Ditto. (fhandler_socket::send): Ditto. (fhandler_socket::read): Delegate to fhandler_socket::recvfrom. (fhandler_socket::write): Delegate to fhandler_socket::sendto. (fhandler_socket::sendto): Check for null `to' address. * net.cc (cygwin_sendto): Check for zero request length. (cygwin_recvfrom): Ditto. Fix signature, use void *buf. (cygwin_recv): Delegate to cygwin_recvfrom. (cygwin_send): Delegate to cygwin_sendto.
* * cygthread.cc (cygthread::cygthread): Close another race.Christopher Faylor2002-08-112-1/+12
|
* * assert.cc (__assert): Call debugger on assertion failure if debugging.Christopher Faylor2002-08-117-25/+41
| | | | | | | | | | | | | * dcrt0.cc (dll_crt0_1): Just wait for signal thread to go live rather than going through the overhead of invoking it. * fork.cc (fork_child): Ditto. * exceptions.cc (signal_fixup_after_fork): Call sigproc_init here. * sigproc.cc (proc_can_be_signalled): Assume that the signal thread is live. (sig_dispatch): Ditto. (sig_send): Ditto. (wait_for_sigthread): Renamed from "wait_for_me". Assume that wait_sig_inited has been set and that this function is only called from the main thread. * winsup.h (wait_for_sigthread): Declare new function.
* * environ.cc (parse_options): Remember the "no" part of any options for laterChristopher Faylor2002-08-082-1/+7
| | | | export.
* * winsup.h (__check_null_invalid_struct): Make ptr argument non-const.Conrad Scott2002-08-086-150/+191
| | | | | | | | | | | | | | | | | | | | | | | | | (__check_null_invalid_struct_errno): Ditto. * miscfuncs.cc (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr_errno): Remove superfluous cast. * net.cc (get): Set appropriate errno if fd is not a socket. (cygwin_sendto): Fix parameter checking. (cygwin_recvfrom): Ditto. (cygwin_setsockopt): Ditto. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_gethostbyaddr): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_listen): Ditto. (cygwin_getpeername): Ditto. (cygwin_send): Ditto. (cygwin_shutdown): Ditto. Move sigframe to fhandler_socket. (cygwin_recvmsg): Fix parameter checking. Add tracing. (cygwin_sendmsg): Ditto. * fhandler_socket.cc (fhandler_socket::shutdown): Add sigframe. * resource.cc (setrlimit): Fix parameter checking.
* Patch by Joe Buehler <jbuehler@hekimian.com>:Corinna Vinschen2002-08-082-1/+5
| | | | * sec_helper.cc (sec_acl): remove extraneous arg to debug_printf.
* Fix by Conrad Scott <conrad.scott@dsl.pipex.com>:Corinna Vinschen2002-08-072-2/+7
| | | | * fhandler_socket.cc (fhandler_socket::accept): Fix FIONBIO call.
* one more changeChristopher Faylor2002-08-072-1/+2
|
* * cygheap.cc (_csbrk): Avoid !cygheap considerations.Christopher Faylor2002-08-072-20/+18
| | | | (cygheap_init): Deal with unintialized cygheap issues here.
* Conrad Scott <conrad.scott@dsl.pipex.comChristopher Faylor2002-08-063-3/+9
| | | | | * cygheap.cc (_csbrk): Allocate some slop initially. Don't erroneously add sbrk amount to returned value in initial case.
* * spawn.cc (spawn_guts): Don't set mount_h here.Christopher Faylor2002-08-063-1/+7
| | | | | * sigproc.cc (init_child_info): Set it here instead. * shared.cc (cygwin_mount_h): Make NO_COPY.
* * cygthread.cc (cygthread::stub): Accept flag to pass info structure to threadChristopher Faylor2002-08-065-14/+53
| | | | | | | | | | | | | | | | function. (cygthread::operator new): Add defense debugging output. (cygthread::cygthread): Add debugging output. Set name after thread has been awakened to avoid a race. (cygthread::exit_thread): Use handle operator rather than using ev directly. (cygthread::exit_thread): Reorganize to provide debugging. Set __name to NULL. * cygthread.h (cygself): Define. * fhandler_tty.cc (fhandler_tty_master::init): Use cygself as argument so that invoked thread can access its own info. (process_output): Derive cygthread info of thread from thread argument. * sigproc.cc (sigproc_init): Use cygself as argument so that invoked thread can access its own info. (wait_sig): Derive cygthread info of thread from thread argument.
* * debug.h (handle_list::allocated): Remove field.Conrad Scott2002-08-063-17/+12
| | | | | | * debug.cc (newh): Don't malloc extra entries. (add_handle): Downgrade strace message level. (delete_handle): Remove case for `allocated' entries.
* * cygthread.cc (cygthread::stub): Change event creation to manual reset. SetChristopher Faylor2002-08-052-7/+30
| | | | | __name after calling SetEvent to prevent races. (cygthread::detach): Always reset event here to prevent races.
* * debug.h (WaitForMultipleObjects): Correct typo.Conrad Scott2002-08-032-1/+5
|
* updateChristopher Faylor2002-08-031-1/+5
|
* * security.cc (verify_token): Do not reject a token just becauseCorinna Vinschen2002-08-024-6/+19
| | | | | | | | the supplementary group list is missing Everyone or a groupsid equal to usersid, or because the primary group is not in the token, as long as it is equal to the usersid. * syscalls.cc (seteuid32): Use common code for all successful returns. * grp.cc (getgroups32): Never includes Everyone in the output.
* * cygthread.cc (cygthread::exit_thread): Define new method.Christopher Faylor2002-08-027-20/+46
| | | | | | | | | | | | | | | * cygthread.h (cygthread::exit_thread): Declare new method. * fhandler.h (fhandler_tty_master::hThread): Delete. (fhandler_tty_master::output_thread): Define. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Adjust constructor. (fhandler_tty_master::init): Use cygthread rather than handle. (process_output): Use cygthread method to exit. (fhandler_tty_master::fixup_after_fork): Set output_thread to NULL after fork. (fhandler_tty_master::fixup_after_exec): Set output_thread to NULL after spawn/exec. * tty.cc (tty_list::terminate): Detach from output_thread using cygthread method.
* * syscalls.cc (_link): Revert previous change and just always dereference theChristopher Faylor2002-08-012-9/+10
| | | | oldpath.
* * syscalls.cc (link): Properly deal with a link to a symlink.Christopher Faylor2002-08-012-0/+7
|
* * cygthread.cc: Remove cruft.Christopher Faylor2002-08-012-22/+4
|
* * Makefile.in (DLL_OFILES): Add cygthread.o.Christopher Faylor2002-08-0115-287/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dcrt0.cc (dll_crt0_1): Eliminate various thread initialization functions in favor of new cygthread class. * debug.cc: Remove thread manipulation functions. * debug.h: Ditto. * external.cc (cygwin_internal): Use cygthread method for determining thread name. Remove capability for setting thread name. * fhandler_console.cc (fhandler_console::read): Use cygthread method rather than iscygthread function. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Use cygthread methods to create threads. (fhandler_tty_common::__acquire_output_mutex): Use cygthread method to retrieve thread name. * select.cc (pipeinf): Use cygthread pointer rather than handle. (start_thread_pipe): Ditto. (pipe_cleanup): Ditto. (serialinf): Ditto. (start_thread_serial): Ditto. (serial_cleanup): Ditto. (socketinf): Ditto. (start_thread_socket): Ditto. (socket_cleanup): Ditto. * sigproc.cc (hwait_sig): Ditto. (hwait_subproc): Ditto. (proc_terminate): Ditto. (sigproc_terminate): Ditto. (sigproc_init): Initialize cygthread hwait_sig pointer. (subproc_init): Initialize cygthread hwait_subproc pointer. (wait_sig): Rely on cygthread HANDLE operator. * strace.cc (strace::vsprntf): Use cygthread::name rather than threadname. * window.cc (gethwnd): Use cygthread method to initialize thread.
* * fhandler.h (fhandler_base::get_r_no_interrupt): Make non-virtual.Corinna Vinschen2002-07-313-1/+7
| | | | * net.cc (fdsock): Call set_r_no_interrupt.
* * syscalls.cc (_read): Clarify debugging output.Christopher Faylor2002-07-312-4/+9
|
* * fhandler.h (fhandler_base::get_r_no_interrupt): Make virtual.Christopher Faylor2002-07-312-1/+5
|
* * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Incorporate . and ..Christopher Faylor2002-07-302-15/+20
| | | | | | processing here. (fhandler_cygdrive::readdir): Assume . and .. are already in pdrive. (fhandler_cygdrive::seekdir): Ditto.
* fix typoChristopher Faylor2002-07-301-1/+1
|
* * dcrt0.cc (dll_crt0_1): Move debug_fixup_after_fork_exec.Christopher Faylor2002-07-304-33/+38
| | | | | * cygheap.cc (cygheap_fixup_in_child): Call debug_fixup_after_fork_exec immediately after cygheap has ben set up.
* * security.cc: Change some formatting.Corinna Vinschen2002-07-299-226/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/cygwin/version.h: Bump API minor version. * cygheap.h (class cygheap_user): Add member groups. * security.h (class cygsidlist): Add members type and maxcount, methods position, addfromgr, alloc_sids and free_sids and operator+= (const PSID psid). Modify contains () to call position () and optimize add () to use maxcount. (class user_groups): Create. Update declarations of verify_token and create_token. * security.cc (cygsidlist::alloc_sids): New. (cygsidlist::free_sids): New. (get_token_group_sidlist): Create from get_group_sidlist. (get_initgroups_sidlist): Create from get_group_sidlist. (get_group_sidlist): Suppress. (get_setgroups_sidlist): Create. (verify_token): Modify arguments. Add setgroups case. (create_token): Modify arguments. Call get_initgroups_sidlist and get_setgroups_sidlist as needed. Set SE_GROUP_LOGON_ID from auth_pos outside of the loop. Rename the various group sid lists consistently. * syscalls.cc (seteuid32): Modify to use cygheap->user.groups. (setegid32): Call cygheap->user.groups.update_pgrp. * grp.cc (setgroups): Create. (setgroups32): Create. * uinfo.cc (internal_getlogin): Initialize and update user.groups.pgsid. * cygwin.din: Add setgroups and setgroups32.
* * fhandler_console.cc (fhandler_console::read): Use appropriate kill_pgrpChristopher Faylor2002-07-296-18/+63
| | | | | | | | | method. * select.cc (peek_console): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Send "stopped" signal to entire process group as dictated by SUSv3. * termios.cc (tcsetattr): Detect when stopped signal sent and force a stop before setting anything.
* * include/cygwin/version.h: Bump API version to indicate that ntsec is on byChristopher Faylor2002-07-272-1/+7
| | | | default now.
* * fhandler_registry.cc (fhandler_registry::close): Return any error result toChristopher Faylor2002-07-263-3/+8
| | | | | the caller. * syscalls.cc (_close): Return result of fhandler::close to the caller.
* * security.cc (allow_ntsec): Default to on.Christopher Faylor2002-07-252-2/+7
| | | | (allow_smbntsec): Default to off.
* * times.cc (to_time_t): Always round time_t down to nearest second.Christopher Faylor2002-07-252-4/+4
|
* * Makefile.in: Check if API version is updated when exports areEgor Duda2002-07-252-1/+12
| | | | changed and stop if not so.
* * include/cygwin/version.h: Bump minor API version.Corinna Vinschen2002-07-242-1/+6
|
* * fhandler_serial.cc: Change 'must_init_serial_line capability'Corinna Vinschen2002-07-244-15/+22
| | | | | | to 'supports_reading_modem_output_lines' throughout (negated meaning). * wincap.cc: Ditto. * wincap.h: Ditto.