summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * path.cc (symlink_info::check): Fix a comment.Corinna Vinschen2010-04-222-5/+9
|
* * cygserver.sgml: Note the fact that slave tty/pty handle dispersal isCorinna Vinschen2010-04-223-2/+35
| | | | | | unsed as of Cygwin 1.7.6. * new-features.sgml (ov-new1.7.6): New section. Add tty/pty and setrlimit changes.
* * fhandler_termios.cc (tcinit): Remove previously applied change.Corinna Vinschen2010-04-213-9/+20
| | | | | | | Replace with... * fhandler_tty.cc (fhandler_tty_slave::init): Become process group leader if called from dtable::init_std_file_from_handle. Add comment to explain.
* * dtable.cc (dtable::init_std_file_from_handle): Set access mask forCorinna Vinschen2010-04-212-2/+8
| | | | the slave side of ttys explicitely. Explain why.
* * path.cc (cygwin_create_path): Free memory on error.Christopher Faylor2010-04-202-4/+11
|
* * cygheap.h (struct init_cygheap): Add rlim_core member.Corinna Vinschen2010-04-205-14/+34
| | | | | | | | | | | | * cygheap.cc (cygheap_init): Initialize rlim_core to RLIM_INFINITY. * exceptions.cc (stackdump): Drop extern declaration of rlim_core. Refer to cygheap->rlim_core instead. (exception::handle): Disable stackdumping if cygheap->rlim_core is 0. Don't set WCOREDUMP flag in exit code, if cygheap->rlim_core is 0. (sigpacket::process): Ditto. * resource.cc (rlim_core): Remove. (getrlimit): Fetch RLIMIT_CORE value from cygheap->rlim_core. (setrlimit): Store RLIMIT_CORE value in cygheap->rlim_core.
* * cygerrno.h: Nevermind.Christopher Faylor2010-04-202-2/+4
|
* * transport_pipes.cc: Include ntdef.h to accommodate cygerrno.h.Christopher Faylor2010-04-202-0/+5
|
* * cygerrno.h: Protect use of NTSTATUS for only when we need it.Christopher Faylor2010-04-202-0/+10
| | | | * lib/_cygwin_crt0_common.cc: Remove unneeded declarations.
* * lib/_cygwin_crt0_common.cc: Remove unneeded declarations.Christopher Faylor2010-04-201-3/+0
|
* * fhandler_tty.cc (fhandler_tty_slave::fch_set_sd): Remove commented outCorinna Vinschen2010-04-192-5/+6
| | | | code.
* * autoload.cc (GetNamedPipeClientProcessId): Define.Corinna Vinschen2010-04-199-149/+702
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.h (fhandler_tty_slave::fch_open_handles): Declare private. (fhandler_tty_slave::fch_close_handles): Ditto. (fhandler_tty_slave::cygserver_attach_tty): Drop declaration. (fhandler_tty_slave::fstat): Declare public. (fhandler_tty_slave::fchmod): Declare public. (fhandler_tty_slave::fchown): Declare public. (class fhandler_pty_master): Add master_ctl handle. (fhandler_pty_master::pty_master_thread): Declare public. * fhandler_termios.cc (fhandler_termios::tcinit): If the process is started from a non-Cygwin process, make it tty process group leader. * fhandler_tty.cc: Throughout accommodate additional security related arguments in calls to functions creating or opening objects. (close_maybe): Move to start of file to reuse it in other methods. (struct pipe_request): Define. (struct pipe_reply): Define. (fhandler_tty_slave::open): Throughout, try to open synchronization objects with MAXIMUM_ALLOWED permissions. Drop call to cygserver. Try to duplicate pipe handles via master_ctl pipe if duplicating directly doesn't work. (fhandler_tty_slave::cygserver_attach_tty): Remove. (fhandler_tty_slave::init): Close unused incoming pipe handle. (fhandler_pty_master::close): Send exit message to master control thread and close master_ctl handle. (fhandler_pty_master::pty_master_thread): New method, implementing the master control thread. (pty_master_thread): Static helper to start master control thread. (fhandler_pty_master::setup): Simplify creating pipe inheritance. Make sure we're the one creating the input_available_event. Add comment to explain why. Create master_ctl pipe and start master control thread. Close master_ctl handle in case of error. * security.cc (alloc_sd): Add code to handle tty objects. Add comments to explain what exactly is required. (get_object_sd): New function. (get_object_attribute): New function. (create_object_sd_from_attribute): New function. (set_object_sd): New function. (set_object_attribute): New function. (set_file_attribute): Change attribute type to mode_t. * security.h (set_file_attribute): Change attribute type to mode_t. (get_object_sd): Declare. (get_object_attribute): Declare. (create_object_sd_from_attribute): Declare. (set_object_sd): Declare. (set_object_attribute): Declare. * tty.cc (tty::slave_alive): Implement directly instead of via alive. (tty::exists): Open mutex handle with READ_CONTROL access. (tty::alive): Remove. (tty::open_output_mutex): Convert to inline method. (tty::open_input_mutex): Ditto. (tty::open_mutex): Take additional ACCESS_MASK parameter for the mutex open access mask. (tty::open_inuse): New method. (tty::create_inuse): Take PSECURITY_ATTRIBUTES parameter. Drop fmt name parameter. Always create TTY_SLAVE_ALIVE event. (tty::get_event): Take additional PSECURITY_ATTRIBUTES parameter for CreateEvent. * tty.h (class tty): Change declarations according to aforementioned changes. (tty::open_output_mutex): Implement as inline method. (tty::open_input_mutex): Ditto.
* * dtable.cc (dtable::init_std_file_from_handle): Set dev toCorinna Vinschen2010-04-192-3/+23
| | | | | | | valid content for ptys. Remove setting FILE_CREATE_PIPE_INSTANCE in access flags since it's not needed. Set the access mask for kernel objects according to what's returned by NtQueryInformationFile, info class FileAccessInformation.
* * syscalls.cc (rename): On STATUS_ACCESS_VIOLATION, retry to openCorinna Vinschen2010-04-192-0/+23
| | | | | for DELETE until the STATUS_ACCESS_VIOLATION goes away. Add comment to explain why.
* * sec_helper.cc (get_null_sd): Make static. Use PSECURITY_DESCRIPTORCorinna Vinschen2010-04-173-7/+11
| | | | | | instead of SECURITY_DESCRIPTOR *. (sec_acl): Fix fomratting. * security.h (get_null_sd): Drop declaration.
* * cygerrno.h (seterrno_from_nt_status): Declare.Corinna Vinschen2010-04-163-9/+27
| | | | | | | | (__seterrno_from_nt_status): Call seterrno_from_nt_status. * errno.cc (seterrno_from_win_error): Set errno without calling set_errno to avoid packing strace output with errno messages. (seterrno_from_nt_status): New function to print NT status as well as resulting Windows error.
* * kernel32.cc (CreateEventW): Create event object with EVENT_ALL_ACCESSCorinna Vinschen2010-04-152-4/+12
| | | | | | | access mask. (CreateMutexW): Create mutex object with MUTEX_ALL_ACCESS access mask. (CreateSemaphoreW): Create semaphore object with SEMAPHORE_ALL_ACCESS access mask.
* * sec_helper.cc (set_cygwin_privileges): Enable SE_DEBUG_PRIVILEGE, ifCorinna Vinschen2010-04-152-0/+15
| | | | available. Add comments.
* * fhandler_socket.cc (get_inet_addr): Only test the file for being aCorinna Vinschen2010-04-132-14/+39
| | | | | | socket after opening it. Retry if opening failed with sharing violation. Explain why we do this. (fhandler_socket::bind): Create file with no sharing allowed.
* * cygheap.cc (cwcsdup): Fix allocation size to accommodate sizeof WCHAR.Corinna Vinschen2010-04-132-2/+7
| | | | (cwcsdup1): Ditto.
* * include/cygwin/version.h: Bump DLL minor version number to 5.Corinna Vinschen2010-04-122-1/+5
|
* * posix.sgml (std-notes): Improve lseek description.Corinna Vinschen2010-04-122-2/+7
|
* * fhandler_tty.cc (fhandler_tty_slave::open): Add code to duplicateCorinna Vinschen2010-04-122-11/+33
| | | | | | handles within a single process to simplify openpty case. (fhandler_tty_slave::cygserver_attach_tty): Correctly send Windows PID to cygserver, rather than the Cygwin PID.
* * cygwin.dsl: Remove comments.Christopher Faylor2010-04-112-4/+4
|
* * new-features.sgml (ov-new1.7.5): New section.Corinna Vinschen2010-04-112-0/+17
|
* * fhandler.h (class dev_console): Add backspace_keycode member.Corinna Vinschen2010-04-113-2/+16
| | | | | | | | * fhandler_console.cc (fhandler_console::get_tty_stuff): Initialize backspace_keycode with CERASE. (fhandler_console::read): Return dev_state->backspace_keycode if the backspace key is pressed. (fhandler_console::char_command): Implement DECBKM escape sequence.
* * cygwin-api.in.sgml: Update to DocBook SGML 4.5 DTD.Christopher Faylor2010-04-116-9/+17
| | | | | | | * cygwin-ug-net.in.sgml: Ditto. * cygwin-ug.in.sgml: Ditto. * faq-sections.xml: Ditto. * faq.xml: Ditto.
* * fhandler_console.cc (fhandler_console::read): Default to sending CERASEChristopher Faylor2010-04-102-13/+10
| | | | | character if termios VERASE field is zero. (fhandler_console::fixup_after_fork_exec): Avoid a spurious debug message.
* update copyrightChristopher Faylor2010-04-101-1/+1
|
* * mkvers.sh: Use modern date formats to construct the date.Christopher Faylor2010-04-102-27/+8
|
* * nlsfuncs.cc (__set_lc_time_from_win): Actually setCorinna Vinschen2010-04-092-0/+6
| | | | _time_locale->md_order to the D_MD_ORDER value written to the buffer.
* * path.cc (path_conv::set_normalized_path): Use crealloc_abort to avoid aChristopher Faylor2010-04-093-2/+10
| | | | | | memory leak. * path.h (path_conv::operator =): Just use cstrdup to allocate normalized_path, avoiding attempt to free a pointer which is allocated in another pc.
* * include/cygwin/version.h: Bump DLL minor version number to 4.Corinna Vinschen2010-04-072-1/+5
|
* * thread.cc (valid_sched_parameters): Declare extern here.Corinna Vinschen2010-04-062-0/+7
| | | | (sched_set_thread_priority): Ditto.
* * include/sched.h: Remove, overruled by newlib file.Corinna Vinschen2010-04-063-80/+5
| | | | * include/sys/sched.h: Ditto.
* * fhandler_fifo.cc (fhandler_fifo::open): Accommodate previous return valueChristopher Faylor2010-04-062-1/+6
| | | | change to setup_overlapped.
* * fhandler.h (fhandler_base::has_ongoing_io): Declare virtual method.Christopher Faylor2010-04-025-67/+55
| | | | | | | | | | | | | * select.cc (peek_pipe): Reorganize slightly. Don't attempt to check a handle if it has ongoing I/O. (select_pipe_info::select_pipe_info): Delete definition. (select_pipe_info::~select_pipe_info): Delete definition. (thread_pipe): Get rid of WFMO call. Reorganize loop. (pipe_cleanup): Remove dependence on destructor. (thread_serial): Reorganize loop. * select.h (select_pipe_info): Empty this class since it no longer has any special requirements (for now). * syscalls.cc (readv): Remove an unneeded debug printf.
* * fhandler.h (fhandler_base::setup_overlapped): Delete virtual declaration.Christopher Faylor2010-04-025-29/+75
| | | | | | | | | | | | | | | | | | (fhandler_base::destroy_overlapped): Ditto. (fhandler_base_overlapped): Remove now-unneeded friend. (fhandler_base_overlapped::setup_overlapped): Return int, remove parameter. (fhandler_base_overlapped::get_overlapped): Return reference. (fhandler_base_overlapped::fhandler_base_overlapped): Be more assertive about zeroing everything. (fhandler_base_overlapped::fixup_after_fork): Declare new function. (fhandler_base_overlapped::fixup_after_exec): Ditto. (fhandler_base_overlapped::dup): Ditto. (fhandler_base_overlapped::close): Ditto. * fhandler_fifo.cc (fhandler_fifo::dup): Call fhandler_base_overlapped::dup rather than fhandler_base::dup. * pipe.cc (fhandler_pipe::dup): Ditto. (fhandler_pipe::init): Accommodate change in setup_overlapped arguments for "opened_properly" case.
* * fhandler_fifo.cc (fhandler_fifo::fhandler_fifo): Properly initializeChristopher Faylor2010-04-022-2/+6
| | | | overlapped part of this class.
* * fhandler_tty.cc (fhandler_tty_slave::close): Revert previous change.Corinna Vinschen2010-04-022-3/+6
|
* fix typoChristopher Faylor2010-04-021-1/+1
|
* * select.h (select_pipe_info::add_watch_handle): Delete declaration.Christopher Faylor2010-04-023-11/+8
| | | | | | | * select.cc (select_pipe_info::add_watch_handle): Delete deinition. (fhandler_pipe::select_read): Delete call to add_watch_handle. (fhandler_pipe::select_write): Ditto. (fhandler_pipe::select_except): Ditto.
* * dtable.cc (dtable::init_std_file_from_handle): Avoid adding fh to fdtab untilChristopher Faylor2010-04-023-30/+51
| | | | | | we know that it is good. * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Handle error conditions more consistently. Avoid handle leakage on error.
* * fhandler_tty.cc (fhandler_tty_slave::close): Avoid potential crashCorinna Vinschen2010-04-022-2/+8
| | | | if former open call has been unsuccessful.
* * nlsfuncs.cc: Fix indentation.Corinna Vinschen2010-04-012-4/+8
|
* * nlsfuncs.cc (rebase_locale_buf): New helper function to rebaseCorinna Vinschen2010-04-012-0/+35
| | | | | | | function pointers in locale structures. Explain why this is necessary. (__set_lc_time_from_win): Use rebase_locale_buf after realloc. (__set_lc_numeric_from_win): Ditto. (__set_lc_monetary_from_win): Ditto.
* * setup-net.sgml: Remove more mentions of rxvt.Charles Wilson2010-04-012-2/+7
|
* * cygwinenv.sgml: Remove/deprecate mention of rxvt.Christopher Faylor2010-03-315-11/+20
| | | | | | * effectively.sgml: Ditto. * faq-using.xml: Ditto. * setup-net.sgml: Ditto.
* * sigproc.cc (wait_sig): Make sure that strace is activated on __SIGSTRACE byChristopher Faylor2010-03-314-2/+13
| | | | | | | calling new strace::activate function. * strace.cc (strace::activate): Rename from strace::strace. * strace.h (strace::activate): Define new function. (strace::strace): Call activate.
* * fhandler.h (fhandler_base_overlapped): Temporarily (?) make select_pipe_infoChristopher Faylor2010-03-313-4/+47
| | | | | | | | a friend until the fhandler_tty intertangling can be worked out. * select.cc (select_pipe_info::add_watch_handle): Don't inspect the overlapped event if we're not waiting for I/O. (fhandler_tty_common::select_*): Change to standard function. Don't do kludgy fhandler_pipe coercion.