summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/select.cc
Commit message (Collapse)AuthorAgeFilesLines
* * fhandler.h (fhandler_serial::ev): New class member.Christopher Faylor2001-12-111-5/+3
| | | | | | * fhandler_serial.cc (fhandler_serial::raw_read): Use class member for event status. * select.cc (peek_serial): Ditto.
* * dtable.cc (dtable::vfork_parent_restore): Add debugging statement.Christopher Faylor2001-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger attached. * fhandler.h (fhandler_base::set_nohandle): New method. (fhandler_base::get_nohandle): New method. * fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no handle. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on dummy fd. * Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a * fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting since it is no longer used. * miscfuncs.cc (check_null_str): New function. (+check_null_str_errno): Ditto. * net.cc: Add defensive buffer checking throughout. (cygwin_sendto): Protect against invalid fd. (cygwin_recvfrom): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * winsup.h: Declare a new function. * select.cc (set_bits): Fix conditional for setting fd in exceptfds. * dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device type. * path.cc (get_devn): Set correct pipe device type from device name.
* * select.cc: Set errno using set_sig_errno() throughout.Corinna Vinschen2001-11-081-9/+9
| | | | | * signal.cc (signal): Always set SA_RESTART flag. * syscalls.cc (_read): Revert previous patch.
* * select.cc (fhandler_tty_slave::ready_for_read): Return 0 on EBADF.Corinna Vinschen2001-11-081-1/+1
| | | | | * syscalls.cc (_read): If ready_for_read() failed, save errno from being overwritten by signal handler call.
* * select.cc (fhandler_tty_slave::ready_for_read): Correct inverted not_openChristopher Faylor2001-11-061-1/+1
| | | | test.
* Eliminate excess whitespace.Christopher Faylor2001-11-051-2/+2
|
* * select.cc: Add more comments throughout. Use bool 'true' where appropriateChristopher Faylor2001-11-051-17/+26
| | | | | | | throughout. (fhandler_socket::select_read): Remove duplicate setting for *_ready which inadvertently overrode previous, correct setting. (fhandler_socket::select_write): Ditto.
* * select.cc (verify_console): New function.Christopher Faylor2001-11-041-2/+17
| | | | | | | (verify_windows): Ditto. (fhandler_console::select_read): Really do need to verify that there is something to read. (fhandler_console::select_windows): Ditto.
* * fhandler.h (fhandler_base::ready_for_read): Remove unused argument.Christopher Faylor2001-11-041-155/+107
| | | | | | | | | | | | | | (fhandler_tty_slave::ready_for_read): Ditto. (select_record): Remove poll, initialize peek. * select.cc: Remove all poll functions, throughout. Change second argument of peek_* functions to 'bool' throughout. Specifically initialize *_ready variables throughout. (select_stuff::poll): Subsume previous poll functionality. (peek_pipe): Don't grab guard mutex when in select loop. select()/read() is racy by design so there is no need to worry about a race in select(). (fhandler_base::ready_for_read): Remove unused argument. (fhandler_tty_slave::ready_for_read): Ditto. * syscalls.cc (_read): Eliminate third argument in ready_for_read call.
* * fhandler.cc (fhandler_base::read): Return just read ahead characters if slowChristopher Faylor2001-11-031-9/+12
| | | | | | | | | | | device. * fhandler.h (fhandler_base::set_eof): New virtual method. (fhandler_pipe::set_eof): New method. * pipe.cc (fhandler_pipe::fhandler_pipe): Clear saweof flag. (fhandler_pipe::read): Return immediately if hit eof. (fhandler_pipe::hit_eof): Return true if saweof flag is set. * select.cc (peek_pipe): Don't call PeekNamedPipe if we couldn't grab the guard mutex.
* * dll_init.h (class dll_list): Reorder functions to avoid compiler "can'tChristopher Faylor2001-11-031-6/+17
| | | | | | | | | | | | | | | | inline" warnings. * security.h (class cygsid): Ditto. * sigproc.cc (get_proc_lock): Ditto. * sigproc.h (class sigframe): Ditto. * sync.h (class muto): Ditto. * fhandler.h (fhandler_base::get_guard): Actually MAKE virtual as previously indicated. * pipe.cc (make_pipe): Remove extraneous set_errno. * syscalls.cc (_open): Ditto. * select.cc (peek_pipe): Need to check that there is still something to read from the pipe after acquiring the mutex since another process/thread could have eaten the input before we got to acquiring the lock. (Thanks to Nick Duffek for this inspiration.)
* * fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.Christopher Faylor2001-11-021-0/+1
| | | | | | * select.cc (fhandler_base::ready_for_read): Set read_ready to zero prior to testing it or it will be uninitialized. * Makefile.in (CFLAGS): Move setting to Makefile.common.
* * cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not open.Christopher Faylor2001-11-011-0/+3
| | | | | | | * select.cc (fhandler_base::ready_for_read): Release an open guard mutex when exiting with an error condition. * syscalls.cc (_read): Check frequently for closed fd as a kludge until something better is invented.
* * dtable.cc (dtable::build_fhandler): Issue internal error on unknown device.Christopher Faylor2001-11-011-61/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fhandler.cc (fhandler_base::close): Show both name and handle in debugging output. * fhandler.h (fhandler_base::get_guard): New virtual method. (fhandler_pipe::get_guard): New method. (fhandler_socket::ready_for_read): Delete declaration. (fhandler_pipe::ready_for_read): Ditto. (fhandler_serial::ready_for_read): Ditto. (fhandler_console::ready_for_read): Ditto. (fhandler_tty_common::ready_for_read): Ditto. (fhandler_windows::ready_for_read): Ditto. (struct select_record::peek): Declare new method. * select.cc (MAKEready): Delete. (peek_pipe): Use get_guard method to retrieve potential guard mutex handle. (fhandler_base::ready_for_read): Rewrite as generic ready-for-read handler. Should only be called for "slow" devices. (fhandler_socket::ready_for_read): Delete definition. (fhandler_pipe::ready_for_read): Ditto. (fhandler_serial::ready_for_read): Ditto. (fhandler_console::ready_for_read): Ditto. (fhandler_tty_common::ready_for_read): Ditto. (fhandler_windows::ready_for_read): Ditto. (fhandler_pipe::select_read): Fill in new peek record in select_record structure. (fhandler_console::select_read): Ditto. (fhandler_tty_common::select_read): Ditto. (fhandler_serial::select_read): Ditto. (fhandler_socket::select_read): Ditto. (fhandler_socket::select_read): Ditto. (fhandler_tty_slave::ready_for_read): Check for tty not open. Set errnos appropriately. * syscalls.cc (_read): Allow ready_for_read to set errno. * pinfo.cc (pinfo::init): Return spawn/NO_WAIT process as valid if it is initializing. * sigproc.cc (getsem): Adjust wait for process to initialize downward to avoid huge waits.
* * select.cc (MAKEready): Remove extraneous select_read.Christopher Faylor2001-10-291-1/+0
|
* * fhandler.h (fhandler_serial::fhandler_serial): Change to only accept unitChristopher Faylor2001-10-291-1/+1
| | | | | | | | argument. * fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto. (fhandler_serial::open): Avoid else when previous clause is a return(). * path.cc (get_devn): Alias /dev/ttyS0 -> /dev/com1, etc. (get_device_number): Reallow standalone "com1" as a valid name for /dev/com1.
* * select.cc (MAKEready): Check for read_ready in loop since select_read couldChristopher Faylor2001-10-261-6/+6
| | | | | | set it. (peek_socket): Check ready/write/except specifically since they could have been set even prior to peek_socket call.
* * autoload.cc (load_wsock32): Declare dummy function to force loading ofChristopher Faylor2001-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | winsock. * fhandler.cc (fhandler_base::set_inheritance): Make debugging output more verbose. * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Force loading of winsock32 if winsock2 not available. * net.cc (set_socket_inheritance): Use DuplicateHandle in all cases to set inheritance correctly. (fdsock): Use winsock2_active macro to determine when to set socket inheritance. Remove fdtab resource locking since this function should already be protected. (cygwin_accept): Simplify logic. Ensure that fdtab unlock is not called inappropriately. (cygwin_rcmd): Use fdtab locking. (cygwin_rresvport): Ditto. (cygwin_rexec): Ditto. * select.cc (peek_socket): Set errno appropriately if winsock select fails. * winsup.h: Declare check_pty_fds. * syscalls.cc (check_pty_fds): Rename from check_ttys_fds. Also check pty master. (setsid): Use check_pty_fds. * dtable.cc (dtable::dec_console_fds): Add check on pty fds.
* Add "path.h" include throughout, where needed. Use new path_conv methods andChristopher Faylor2001-10-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operators to simplify testing for directory and attributes, throughout. * path.h (path_conv::exists): New method. (path_conv::has_attribute): Ditto. (path_conv::isdir): Ditto. (path_conv::DWORD &): New operator. (path_conv::int &): Ditto. * dir.cc (rmdir): Eliminate a goto. * dtable.cc (dtable::build_fhandler): Accept opt and suffix info for path_conv.check. Return fh == NULL on path_conv error. Pass unit to set_name as appropriate. (dtable::reset_unix_path_name): New method. * dtable.h (dtable): Declare new method. Reflect arg changes to build_fhandler. * fhandler.cc (fhandler_disk_dummy_name): Eliminate. (fhandler_base::set_name): Expect paths to be NULL. Build unix_path_name from win32_path_name when it is a device. (fhandler_base::reset_unix_path_name): New method. (fhandler_base::raw_read): Report EISDIR when ERROR_INVALID_FUNCTION or ERROR_INVALID_PARAMETER and reading a directory. (fhandler_disk_file::fstat): Don't call stat_dev since we should now never be calling fhandler_disk_file methods with devices. (fhandler_base::fhandler_base): Clear {unix,win32}_path_name. (fhandler_base::~fhandler_base): Always free {unix,win32}_path_name. (fhandler_disk_file::fhandler_disk_file): Remove set_no_free_names kludge. (fhandler_disk_file::open): Ditto. * fhandler.h (fhandler_base::no_free_names): Eliminate. (fhandler_base::set_no_free_names): Ditto. * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Don't set unix_path_name here. * path.cc (fchdir): Lock fd table throughout. Use new dtable::reset_unix_path_name method to reset path. * syscalls.cc (stat_worker): Reorganize to always call fstat method. Pass path_conv method to fhandler_*::open. (chroot): Elminate a goto.
* * select.cc (peek_pipe): REALLY only grab mutex when we actually got somethingChristopher Faylor2001-09-261-1/+2
| | | | from the pipe.
* * select.cc (fhandler_tty_common::ready_for_read): Rewrite to correctlyChristopher Faylor2001-09-251-6/+11
| | | | call peek_pipe.
* * select.cc (peek_pipe): Only grab mutex when we actually got something fromChristopher Faylor2001-09-241-5/+5
| | | | the pipe.
* * fhandler.h (fhandler_pipe::hit_eof): New method.Christopher Faylor2001-09-241-5/+6
| | | | | | | | | | | | | | | | | | (writepipe_exists): New class element. (orig_pid): Ditto. (id): Ditto. (is_slow): Eliminate. * pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance on writepipe_exists, if it exists. (fhandler_pipe::hit_eof): New method, modelled after tty. (fhandler_pipe::dup): Duplicate writepipe_exists, if it exists. (make_pipe): Set up a dummy event for pipes on windows 9x. The nonexistence of this event means that the write side of the pipe has closed. (_dup): Move to syscalls.cc (_dup2): Ditto. * dtable.cc (dtable::build_fhandler): Fill out set_names here, if appropriate. * syscalls.cc (_open): Call set_names in build_fhandler.
* * exceptions.cc (setup_handler): Always relinquish lock after we'veChristopher Faylor2001-09-221-13/+24
| | | | | | | | | | | | | | | | | | | | interrupted. * fhandler.cc: Move pipe methods to pipe.cc. * fhandler.h (fhandler_pipe): Add new methods. * fork.cc (sync_with_parent): Make error messages more informative. * pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc. (fhandler_pipe::lseek): Ditto. (fhandler_pipe::set_close_on_exec): New method. (fhandler_pipe::read): Ditto. (fhandler_pipe::close): Ditto. (fhandler_pipe::dup): Ditto. (make_pipe): Create the guard mutex on the read side of the pipe. * select.cc (peek_pipe): Use guard_mutex to discover if we have the right to read on this pipe. (fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe. * syscalls.cc (_read): Always detect signal catchers, for now. * debug.cc (makethread): Eliminate hack to make thread inheritable. * sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
* * cygwin.sc: New file -- linker script for building cygwin DLL.Christopher Faylor2001-08-311-3/+19
| | | | | | | | | | | | | | | | | | | | | | | * Makefile.in: Use linker script to control location of cygheap. * cygheap.cc (buckets): Make static. (init_cheap): Remove special iswinnt handling. Allocate cygheap at a fixed location. Display more info when allocation fails. (cygheap_fixup_in_child): Try harder to move cygheap to correct location. Display more info when allocation fails. * fhandler.h (fhandler_socket): Add macros for tracking socket shutdown state. * net.cc (cygwin_shutdown): Set appropriate shutdown value for future use. * select.cc (select_stuff::cleanup): New method. (cygwin_select): Call cleanup explicitly to avoid a race. (select_stuff:~select_stuff): Call cleanup chain via cleanup method. (fhandler_socket::select_read): Set *_ready when shutdown has been called on the socket. (fhandler_socket::select_write): Ditto. (fhandler_socket::select_except): Ditto. * winsup.h: Move NO_COPY to "COMMON" section. * autoload.cc (wsock_started): Avoid initializing NO_COPY value. * sigproc.cc: Remove initialization from NO_COPY variables. (sigproc_init): Initialize sig_loop_wait here, rather than via initialization. (subproc_init): Initialize proc_loop_wait here, rather than via initialization.
* * select.cc (select_read): Add setting read_ready flag.Corinna Vinschen2001-08-301-0/+2
| | | | (select_write): Add setting write_ready flag.
* oopsChristopher Faylor2001-08-281-14/+7
|
* * dir.cc (rmdir): Report ENOENT when file doesn't exist rather than ENOTDIR.Christopher Faylor2001-08-281-7/+14
|
* * select.cc (cygwin_select): Ensure that arguments are zeroed on timeout.Christopher Faylor2001-08-271-12/+14
| | | | (select_stuff::wait): Ditto.
* Throughout, reorganize header file inclusion to put security.h prior toChristopher Faylor2001-07-261-0/+1
| | | | | | | | fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
* * exceptions.cc (handle_exceptions): Break out of "loop" if the debuggerChristopher Faylor2001-05-031-0/+1
| | | | doesn't seem to be attaching to our process.
* Throughout, change fdtab references to cygheap->fdtab.Christopher Faylor2001-04-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | | * child_info.h (cygheap_exec_info): Eliminate special fdtab stuff. * spawn.cc (spawn_guts): Ditto. * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate. * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap. (_cmalloc_entry): Include fdtab here. * dtable.h (dtable): Declare/define new methods. * dtable.cc (dtable::vfork_child_fixup): New method. (dtable::fixup_after_exec): Remove unneeded extra arguments. * dcrt0.cc (dll_crt0_1): Ditto. * environ.cc (getwinenv): Use case sensitive comparison. (winenv): Make a copy of environment cache to avoid realloc problems when duplicate environment variables exist in the environment. (From Egor Duda) * net.cc (cygwin_socket): Revert Apr 14 change. * include/sys/file.h: Protect against previous X_OK definition. * passwd.cc: Eliminate passwd_sem throughout. * security.cc: Ditto. * cygwin.din: Export New functions. * passwd.cc (read_etc_passwd): Make race safe. (getpwuid_r): New function. (getpwnam_r): New function.
* * net.cc (cygwin_socket): Set SO_LINGER to small value so closed UNIX domainChristopher Faylor2001-04-141-2/+7
| | | | | | sockets will not stay around. * select.cc (socket_cleanup): Set SO_LINGER to small value so closed dummy sockets do not stay around. Use correct value for second argument to shutdown.
* * dtable.cc: Guard against new winsock.h/winsock2.h warnings when mixingChristopher Faylor2001-03-201-2/+2
| | | | | | | | winsock*.h and sys/types.h. * fhandler_socket.cc: Ditto. * net.cc: Ditto. * select.cc: Ditto. * exceptions.cc: Remove unneeded define.
* Fix spacing, copyrights.Christopher Faylor2001-03-181-1/+1
|
* * fhandler.h (fhandler_tty_slave): Declare new methods.Egor Duda2001-03-181-0/+47
| | | | | | | | | | | | | | * select.cc (fhandler_tty_slave::select_read): New method. * select.cc (fhandler_tty_slave::ready_for_read): Ditto. * select.cc (verify_tty_slave): New function. * fhandler_termios.cc (fhandler_termios::line_edit): Empty input buffer on signal. * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data after reading from pipe. Reset event if input pipe is empty. * tty.h (class tty): Allow creating events with manual reset. * tty.cc (tty::get_event): Use manual_reset flag. * tty.cc (tty::common_init): Create input_available_event with manual reset.
* Update copyrights.Christopher Faylor2001-03-181-1/+1
|
* * select.cc (peek_console): Don't report read_ready on mouse events unless weChristopher Faylor2001-03-021-1/+4
| | | | | are looking for mouse events. * fhandler.h (fhandler_console::mouse_aware): New method.
* * autoload.cc (LoadDLLinitfunc): Remove debugging statement.Christopher Faylor2001-01-171-2/+2
| | | | | | | | | | | | | | | | | | * exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to earlier in interrupt. ((interrupt_setup): i.e., here. (sig_handle): Don't queue multiple SIGSTOPS. * fhandler.h (bg_check_types): Enumerate return value of bg_check for clarity. * signal.cc (kill_pgrp): Minor cleanup. * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type for function return. Don't raise signal if a signal is already queued. * fhandler_console.cc (fhandler_console::read): Use enumerated return type for bg_check. * select.cc: Ditto, throughout. * read.cc: Ditto, throughout. * termios.cc: Ditto, throughout. (_read): YA interrupt detect simplification. * wait.cc (wait4): Ditto.
* * fhandler_console.cc (read): Add support for xterm-style mouse eventChristopher Faylor2000-12-161-0/+4
| | | | | | | | reporting. (fhandler_console::char_command): Honor mouse events. (fhandler_console::open): Enable mouse input events. (fhandler_console::input_tcsetattr): Ditto. * select.cc (peek_console): Add check for mouse events.
* * select.cc (peek_pipe): Deal with pending newline in pty_master.Christopher Faylor2000-11-091-5/+16
|
* * sigproc.h (sigframe::set): Eliminate second argument. Default bp to currentChristopher Faylor2000-09-081-1/+1
| | | | | | | | frame pointer rather than using this within the function, which is unstable when this method is not inlined. * net.cc: Eliminate use of second argument to sigframe.set throughout. * select.cc (cygwin_select): Ditto. * sigproc.cc (sig_send): Ditto.
* Split out tty and shared_info stuff into their own headers and use throughout.Christopher Faylor2000-09-071-0/+1
| | | | | | | | | | | | | | | | | Include sys/termios.h for files which need it. * tty.h: New file. * shared_info.h: New file. * fhandler.h: Move inline methods that rely on tty stuff to fhandler_console.cc. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Set output_done_event immediately after reading data to speed up tty output processing. (process_output): Set write_error to errno or zero. (fhandler_tty_slave::write): Check previous write error prior to writing to slave end of pipe. This allows tty output to be slightly less synchronous. * fhandler_console.cc (fhandler_console::tcsetpgrp): Moved here from fhandler.h. (fhandler_console::set_input_state): Ditto.
* * Makefile.in: Add cygheap.o.Christopher Faylor2000-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * child_info.h: Add specific exec class. * cygheap.h: New file. Contains declarations for cygwin heap. * cygheap.cc: New file. Implements cygwin heap functions. * dcrt0.cc (quoted): Simplify due to new method for passing arguments between cygwin programs. (alloc_stack_hard_way): Attempt to handle overlapped stack. (dll_crt0_1): Move child_info processing here. Accomodate new method for passing arguments between cygwin programs. Initialize cygwin heap. Establish __argc and __argv variables. (_dll_crt0): Move most of child_info processing to dll_crt0_1. (cygwin_dll_init): Remove duplication. * dtable.cc (dtable::extend): Allocate dtable using cygwin heap. (dtable::build_fhandler): Ditto for fhandler type being constructed. (dtable::dup_worker): Free new fhandler from cygwin heap on error. (dtable::select_*): Don't assume that this == fdtab. (dtable::linearize_fd_array): Delete. (dtable::delinearize_fd_array): Delete. (dtable::fixup_after_exec): New file. (dtable::vfork_child_dup): Use cygwin heap. (dtable::vfork_parent_restore): Ditto. * dtable.h: Remove obsolete methods. Add new method. * environ.cc (posify): Eliminate already_posix parameter and logic. (envsize): New function. (_addenv): Use envsize. (environ_init): Accept an argument pointing to an existing environment list. If supplied, allocate space for this in the the program's heap. * fhandler.cc (fhandler_base::operator =): Move here from fhandler.h. Use cygwin heap to allocate filenames. (fhandler_base::set_name): Allocate/free names from cygwin heap. (fhandler_base::linearize): Delete. (fhandler_base::de_linearize): Delete. (fhandler_base::operator delete): Free from cygwin heap. (fhandler_base::~fhandler_base): Ditto. * fhandler.h: Accomodate elimination of *linearize and other changes above. * fhandler_console.cc (fhandler_console::fixup_after_exec): Rename from de_linearize. * heap.h: New file. * fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Use cygwin heap for name. fhandler_tty::fixup_after_exec): Rename from de_linearize. * fork.cc (fork): Call cygheap_fixup_in_child. * heap.cc: Use declarations in heap.h. * malloc.cc: Sprinkle assertions throughout to catch attempts to free/realloc something from the cygwin heap. * path.cc: Throughout, eliminate use of per-thread cache for cwd. Use cwd_* functions rather than cwd_* variables to access cwd_win32 and cwd_posix. (cwd_win32): New function. (cwd_posix): New function. (cwd_hash): New function. (cwd_fixup_after_exec): New function. * path.h: Accomodate path.cc changes. * pinfo.cc (pinfo_init): Accept a pointer to an environment table. Pass this to environ_init. Eliminate old 'title' tests. * pinfo.h: Accomodate above change in argument. * spawn.cc (struct av): New method for building argv list. (av::unshift): New method. (spawn_guts): Allocate everything that the child process needs in the cygwin heap and pass a pointer to this to the child. Build argv list using new method. Eliminate delinearize stuff. * thread.h: Eliminate _cwd_win32 and _cwd_posix buffers. * winsup.h: Eliminate obsolete functions. Add envsize() declaration.
* * select.cc (cygwin_select): Correct logic for "always_ready" fds or when thereChristopher Faylor2000-08-241-2/+3
| | | | | is no wait specified. * syslog.cc (pass_handler::set_message): Zero the buffer prior to setting it.
* * winsup.h: Eliminate inclusion of most of the cygwin .h files. Use .h filesChristopher Faylor2000-08-221-1/+5
| | | | | only in sources which require them. * Makefile.in: Generate dependencies with -MD option.
* * cygerrno.h: New file. Use this throughout whenever errno manipulation isChristopher Faylor2000-08-221-0/+1
| | | | | | | | | | | | | | | required. * errno.cc: Use DWORD to hold Windows errors. (geterrno_from_win_error): New function. (seterrno_from_win_error): Use geterrno_from_win_error to convert supplied windows error (suggested by Corinna Vinschen). * path.cc (symlink_info): Add error element. * path.cc (path_conv::check): Remove errno setting. Use new symlink_info errno element to set path_conv error, where appropriate. (symlink_info::check): Set error element rather than attempting to manipulate errno. Add more checks for trailing / and /.. even though they are currently useless. Avoid setting EINVAL. * path.cc (normalize_posix_path): Correct check for trailing /.
* * winsup.h: Split out dtable definitions into separate header file.Christopher Faylor2000-08-121-0/+1
| | | | | | * dtable.h: New file. * sigproc.h: Eliminate pinfo.h usage here. Use it in source files that need it.
* Rename hinfo -> dtable. Name the former dtable array 'fdtab'.Christopher Faylor2000-08-121-5/+5
|
* * winsup.h: Change strchr inline for strange gcc problem.Christopher Faylor2000-08-101-0/+5
| | | | * select.cc (select_stuff::wait): Bounds check w4 array.