summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
* * cygtls.cc (_cygtls::call): Call call2 using _my_tls.Christopher Faylor2006-05-257-112/+104
| | | | | | | | | | | | (_cygtls::init_exception_handler): Always replace existing exception handler with cygwin exception handler. * cygtls.h (_cygtls::call2): Remove static designation. * dcrto.cc (dll_crt0_1): Define in a way that allows calling via _cygtls::call. (_initialize_main_tls): Delete. (_dll_crt0): Call dll_crt0_1 via cygtls::call. Set _main_tls here. * external.cc (cygwin_internal): Implement CW_CYGTLS_PADSIZE. * include/sys/cygwin.h (CW_CYGTLS_PADSIZE): Define. * tlsoffsets.h: Regenerate.
* update to newer autoconfChristopher Faylor2006-05-243-1318/+2082
|
* * fhandler.cc (readv): Remove nonsensical assert.Christopher Faylor2006-05-242-2/+4
|
* * select.cc (start_thread_socket): Delay setting thread local exitsock until weChristopher Faylor2006-05-244-1549/+4838
| | | | know it's correct. Return correct value on error.
* * select.cc (start_thread_socket): Clean up exitsock in case of error. UseChristopher Faylor2006-05-242-2/+9
| | | | si->exitcode consistently.
* * child_info.h (_CI_SAW_CTRL_C): New enum.Christopher Faylor2006-05-227-12/+50
| | | | | | | | | | | | | | | | | (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.
* * fhandle.h (fhandler_pipe::create_guard): Revert change which eliminatedChristopher Faylor2006-05-213-32/+64
| | | | | | | | | | | | | | | | SECURITY_ATTRIBUTES argument. * pipe.cc (fhandler_pipe::open): Duplicate guard from other process and protect it appropriately. Eliminate unneeded writepipe_exists temporary variable. Set inheritance appropriately. (fhandler_pipe::set_close_on_exec): Revert change which eliminated handling guard inheritance. (fhandler_pipe::fixup_after_fork): Ditto. Use correct name of entity being checked by fork_fixup. (fhandler_pipe::fixup_after_exec): Don't bother with guard here. (fhandler_pipe::dup): Cosmetic changes and revert creation of writepipe_exists as noninheritable. (fhandler_pipe::create): Revert change which eliminated SECURITY_ATTRIBUTES argument. Revert change which always made writepipe_exists noninheritable.
* check in missing fileChristopher Faylor2006-05-211-11/+25
|
* typoChristopher Faylor2006-05-211-1/+1
|
* * debug.cc (add_handle): Print handle value when collision detected.Christopher Faylor2006-05-216-46/+71
| | | | | | | | | | | | | | | | | | | | | | | * dtable.cc (dtable::stdio_init): Cosmetic change. * fhandler.h (fhandler_base::create_read_state): Protect handle. (fhandler_pipe::create_guard): Ditto. Always mark the handle as inheritable. (fhandler_pipe::is_slow): Return boolean value rather than numeric 1. * pipe.cc (fhandler_pipe::fhandler_pipe): Always flag that we need fork fixup. (fhandler_pipe::open): Don't pass security attributes to create_guard. (fhandler_pipe::set_close_on_exec): Don't handle guard here. (fhandler_pipe::close): Accommodate now-protected guard handle. (fhandler_pipe::fixup_in_child): Don't proected read_state here. (fhandler_pipe::fixup_after_exec): Close guard handle if close_on_exec. (fhandler_pipe::fixup_after_fork): Don't bother with guard here. (fhandler_pipe::dup): Don't set res to non-error prematurely. Use boolean values where appropriate. Protect guard and read_state. (fhandler_pipe::create): Don't call need_fork_fixup since it is now the default. Don't protect read_state or guard. * pipe.cc (fhandler_base::ready_for_read): Use bool values for "avail". * spawn.cc (spawn_guts): Set cygheap->pid_handle as inheritable when protecting. * select.cc (fhandler_pipe::ready_for_read): Actually get the guard mutex for blocking reads.
* * fhandler_tty.cc (fhandler_tty::close): Remove problematic hExeced guard.Christopher Faylor2006-05-202-12/+18
|
* * fhandler_tty.cc (fhandler_tty_slave::open): Reinstate call to need_invisibleChristopher Faylor2006-05-202-1/+8
| | | | on first pty open.
* fix incorrect function name in old entryChristopher Faylor2006-05-201-1/+1
|
* * fhandler_console.cc (fhandler_console::need_invisible): Allocate an invisibleChristopher Faylor2006-05-192-5/+10
| | | | window station when ctty != TTY_CONSOLE.
* * cygtls.cc (_cygtls::remove): Don't test for initialization since thisChristopher Faylor2006-05-173-3/+9
| | | | | | function will always be called when _my_tls is initialized. * init.cc (dll_entry): Don't attempt to remove tls info if _my_tls is obviously not even available.
* correct changelog dateChristopher Faylor2006-05-161-1/+1
|
* * sigproc.cc (no_signals_available): Detect hwait_sig == INVALID_HANDLE_VALUE.Christopher Faylor2006-05-168-85/+105
| | | | | | | | | | | | | | | | | (wait_sig): Set hwait_sig to INVALID_HANDLE_VALUE on __SIGEXIT. * cygtls.cc (_cygtls::init_thread): Zero entire _my_tls structure and no more. * cygtls.h (_my_tls::padding): Delete. (CYGTLS_PADSIZE): Redefine concept of padding to mean padding at the end of the stack. * dcrt0.cc (initialize_main_tls): Change return to void. * gentls_offsets: Treat const specially, too. Keep going after a '}' is found. Change negative offset calculation to use CYGTLS_PADSIZE. * init.cc (_my_oldfunc): New variable. (threadfunc_fe): Use stored tls value for oldfunc rather than blindly writing to the stack. (munge_threadfunc): Set oldfunc in tls. (dll_entry): Initialize tls allocation. * tlsoffsets.h: Regenerate.
* * ntdll.h (STATUS_INVALID_INFO_CLASS): Conditionalize.Christopher Faylor2006-05-142-0/+8
|
* * Makefile.in (clean): Also delete *.dbg.Brian Dessent2006-05-102-1/+5
|
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix typo which causedChristopher Faylor2006-05-082-1/+6
| | | | test for ".." to be skipped.
* * external.cc (cygwin_internal): Set errno on failure.Christopher Faylor2006-05-022-0/+5
|
* * pipe.cc (DEFAULT_PIPEBUFSIZE): Raise to 64K.Corinna Vinschen2006-04-272-1/+5
|
* * fhandler.h (fhandler_base): Change fstat_helper prototypeCorinna Vinschen2006-04-266-95/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | to take file size and inode number as 64 bit values. * fhandler_disk_file.cc (FS_IS_SAMBA): Move to path.cc (FS_IS_SAMBA_WITH_QUOTA): Ditto. (path_conv::hasgood_inode): Delete. (path_conv::is_samba): Delete. (path_conv::isgood_inode): Centralized function to recognize a good inode number. (fhandler_base::fstat_by_handle): Constify fvi_size and fai_size. Accomodate argument change in fstat_helper. (fhandler_base::fstat_by_name): Ditto. (fhandler_base::fstat_helper): Accomodate argument change. Call path_conv::isgood_inode to recognize good inodes. (fhandler_disk_file::opendir): Explain Samba weirdness here. Call path_conv::fs_is_samba instead of path_conv::is_samba. (fhandler_disk_file::readdir): Add STATUS_INVALID_INFO_CLASS as valid return code from NtQueryDirectoryFile to indicate that FileIdBothDirectoryInformation is not supported. Call path_conv::isgood_inode to recognize good inodes. * ntdll.h (STATUS_INVALID_INFO_CLASS): Define. * path.cc (fs_info::update): Rework file system recognition and set appropriate flags. * path.h (struct fs_info): Add is_ntfs, is_samba and is_nfs flags. Constify pure read accessors.
* * environ.cc (getearly): Force correct dereference order when inspectingChristopher Faylor2006-04-242-1/+6
| | | | environ table.
* * select.cc (thread_pipe): Raise sleep time only every 8th iteration.Corinna Vinschen2006-04-242-4/+9
| | | | (thread_mailslot): Ditto.
* * select.cc (thread_pipe): Raise sleep time dynamically to speed upCorinna Vinschen2006-04-232-2/+15
| | | | | select on pipes when copying lots of data. (thread_mailslot): Ditto for mailslots.
* * signal.cc (abort): On second thought, just set incyg once.Christopher Faylor2006-04-222-4/+7
|
* * abort.cc (abort): Set incyg manually to help get a reliable gdb stack trace.Christopher Faylor2006-04-223-1/+10
| | | | * cygwin.din (abort): Make NOSIGFE.
* * environ.cc (getearly): Use GetEnvironmentVariable and cmalloc instead ofChristopher Faylor2006-04-213-26/+27
| | | | | GetEnvironmentStrings. (environ_init): Revert rawenv stuff.
* format comment using GNU-styleChristopher Faylor2006-04-211-7/+4
|
* * environ.cc (rawenv): Make this variable a file-scope static.Christopher Faylor2006-04-212-38/+43
| | | | | | | | | (getearly): Rename 's' variable to 'len' since 's' is used fairly consistently throughout cygwin as a string variable. Remove rawenv declaration. Perform other minor cleanups. (environ_init): Remove rawenv declaration. Only set rawenv to GetEnvironmentStrings() if it has not already been set. Properly free rawenv in all cases.
* * tty.h (tty::hwnd): Move to tty_min.Christopher Faylor2006-04-215-15/+33
| | | | | | | | | | | | | | (tty::gethwnd): Ditto. (tty::sethwnd): Ditto. (tty_min::hwnd): Receive variable from tty class. (tty_min::gethwnd): Receive function from tty classs. (tty_min::sethwnd): Ditto. * dtable.cc (dtable::stdio_init): Only call init_console_handler when we actually own the console. * fhandler_console.cc (fhandler_console::get_tty_stuff): Set tty's hwnd to non-zero value. * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Semi-reinstate handling of console when pgrp is set.
* * environ.cc (getearly): New function.Corinna Vinschen2006-04-212-2/+46
| | | | | | | (findenv_func): New function pointer, predefined to getearly. (getenv): Call findenv function over the findenv_func pointer. (environ_init): Change findenv_func pointer to my_findenv after Cygwin environment is initialized.
* * include/asm/byteorder.h (__ntohl): Fix the missing uint32_t.Corinna Vinschen2006-04-212-1/+5
|
* * fhandler_socket.cc (fhandler_socket::wait): Reorder settingCorinna Vinschen2006-04-212-1/+6
| | | | WSAError to avoid spurious errors with WSAError set to 0.
* * include/asm/byteorder.h: Include stdint.h. Per standard, changeCorinna Vinschen2006-04-212-26/+24
| | | | datatypes in ntohX and htonX functions to uintXX_t types.
* * exceptions.cc (ctrl_c_handler): Only exit TRUE on CTRL_LOGOFF_EVENT when weChristopher Faylor2006-04-182-20/+17
| | | | have actually handled the event.
* * mktemp.cc (_gettemp): Open temp files in binary mode.Christopher Faylor2006-04-172-1/+6
|
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAXCorinna Vinschen2006-04-142-2/+7
| | | | instead of UINT_MAX.
* * fhandler_disk_file.cc (path_conv::hasgood_inode): Make inline.Corinna Vinschen2006-04-143-32/+42
| | | | | | | | | | | Drop remote fs handling entirely since unreliable inode numbers are now recognized differently. (path_conv::is_samba): Make inline. (fhandler_disk_file::opendir): Reformat comment. (fhandler_base::fstat_helper): Special case remote file systems returning (unreliable) 32 bit inode numbers. (fhandler_base::readdir): Ditto. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Ditto.
* trivial changeChristopher Faylor2006-04-141-1/+0
|
* * spawn.cc (spawn_guts): Move ch.set() call back to where it was supposed toChristopher Faylor2006-04-132-1/+6
| | | | be.
* Bump copyright dates.Corinna Vinschen2006-04-131-1/+2
|
* * sysconf.cc (sysconf): Add _SC_THREADS, _SC_THREAD_ATTR_STACKSIZE,Corinna Vinschen2006-04-132-0/+20
| | | | | _SC_THREAD_PRIORITY_SCHEDULING, _SC_THREAD_PROCESS_SHARED, _SC_THREAD_SAFE_FUNCTIONS, _SC_TIMERS handling.
* * spawn.cc (spawn_guts): Revert patch which treated derived cygwin programsChristopher Faylor2006-04-134-9/+35
| | | | | | | | | | | differently from those which are mounted with -X. Pass extra argument to linebuf::fromargv. * winf.h (MAXCYGWINCMDLEN): New define. (linebuf::finish): Add a new argument denoting when command line overflow is ok. (linebuf::fromargv): Ditto. * winf.cc (linebuf::finish): Implement above change. (linebuf::fromargv): Ditto.
* * Makefile.in (DLL_OFILES): Add winf.o.Christopher Faylor2006-04-126-193/+244
| | | | | | * spawn.cc: Move command line handling stuff into winf.cc. * winf.h: New file. * winf.cc: New file.
* * fhandler_socket.cc: Move iptypes.h include after winsock2 since it now reliesChristopher Faylor2006-04-053-2/+8
| | | | | on it. * net.cc: Ditto.
* * dcrt0.cc (dll_crt0_0): Move user_data->{resourcelocks,threadinterface}Christopher Faylor2006-04-052-2/+9
| | | | | initialization here from dll_crt0_1. (dll_crt0_1): See above.
* * net.cc (fdsock): Raise default SO_RCVBUF/SO_SNDBUF buffer sizes toCorinna Vinschen2006-04-042-0/+14
| | | | the same values as on Linux.
* * child_info.h (CURR_CHILD_INFO_MAGIC): Update.Christopher Faylor2006-04-033-21/+31
| | | | | | | | (child_info_fork::alloc_stack): Move into this class. (child_info_fork::alloc_stack_hard_way): Ditto. * dcrt0.cc (child_info_fork::alloc_stack): Ditto. (child_info_fork::alloc_stack_hard_way): Ditto. (_dll_crt0): Reference alloc_stack via fork_info.