Commit Graph

2835 Commits

Author SHA1 Message Date
Christopher Faylor 5957d504f0 * cygtls.cc (_cygtls::fixup_after_fork): Wipe out exitsock local since it
should not be used by the child.
* select.cc (start_thread_socket): Turn off inheritance for exitsock.  Don't
add exitsock to exception mask since it should never get an exception.
(socket_cleanup): Change some debug messages for consistency.
* fhandler_socket.cc (fhandler_socket::dup): Change comment wording slightly.
2004-10-26 21:13:50 +00:00
Pierre Humblet fdf4ad73e1 2004-10-26 Pierre Humblet <pierre.humblet@ieee.org>
* registry.cc (get_registry_hive_path): Simplify and add a
        debug_printf in case of failure.
        (load_registry_hive): Revert the 2004-04-19 change.
2004-10-26 01:53:27 +00:00
Christopher Faylor 4082a9eb4a * select.cc (start_thread_socket): Remove attempt to delay reading of exitsock
or suffer occasional mysterious 60 second hangs.
(socket_cleanup): Empty the exitsock here after the thread has terminated.
2004-10-20 04:49:34 +00:00
Christopher Faylor d134b48fd6 revert erroneous checkin 2004-10-20 01:03:55 +00:00
Christopher Faylor f054a20f1a * fhandler_console.cc (fhandler_console::fixup_after_exec): Fix error message. 2004-10-20 01:02:18 +00:00
Christopher Faylor 96536b50a6 * select.cc (start_thread_socket): Remove unused code. 2004-10-13 03:26:31 +00:00
Christopher Faylor cbec131f8e * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Revert previous checkin. 2004-10-11 15:36:13 +00:00
Christopher Faylor 1cda132258 * cygtls.h (exitsock): New element.
(exitsock_sin): Ditto.
* cygtls.cc (_cygtls::init_thread): Initialize exitsock to invalid handle.
(_cygtls::call2): Close exitsock if it is valid.
* select.cc (struct socketinf): Remove sin element.
(start_thread_socket): Initialize one SOCK_DGRAM socket per thread instead of
(apparently) expensive opening and closing of socket with each select call.
(socket_cleanup): Send a byte to the exitsock socket as a way to potentially
signal a waiting-for-socket thread to exit.
* tlsoffsets.h: Regenerate.
2004-10-11 02:21:31 +00:00
Corinna Vinschen 60cb120f3e * cygheap.h (class cygheap_user): Add psystemroot member and
env_systemroot method.
	* environ.cc (struct spenv): Add add_always member.
	(spenvs): Accomodate new add_always member.  Add
	cygheap_user::env_systemroot method to SYSTEMROOT entry.
	(build_env): Check add_always member when adding missing environment
	variables from spenvs.
	* uinfo.cc (cygheap_user::env_systemroot): New method.
2004-10-07 21:28:57 +00:00
Corinna Vinschen 9286b55306 * dcrt0.cc (dll_crt0_0): Drop duplicated line. 2004-10-07 16:59:02 +00:00
Christopher Faylor d794d08157 revert erroneously applied change 2004-10-07 16:53:51 +00:00
Christopher Faylor 859d85dee0 * spawn.cc (pthread_cleanup::oldmask): Default to invalid signal mask.
(do_cleanup): Test for invalid signal mask to decide whether to restore the
mask rather than assuming zero mask indicates that there is nothing to do.
2004-10-07 16:49:30 +00:00
Corinna Vinschen b9cd8fb5ff * fhandler_tty.cc (fhandler_tty_slave::read): Use previously
evaluated time_to_wait value.
2004-10-07 08:03:24 +00:00
Pierre Humblet b0637a5191 2004-10-05 Pierre Humblet <pierre.humblet@ieee.org>
* external.cc (check_ntsec): Do not call wincap.has_security.
	* path.cc (path_conv::check): Ditto.
	* security.cc (get_object_attribute): Ditto.
	(get_file_attribute): Ditto.
2004-10-06 01:33:39 +00:00
Christopher Faylor 67eedd2473 revert erroneous checkin 2004-10-05 14:35:56 +00:00
Christopher Faylor 0190304668 * pinfo.cc (_pinfo::commune_send): Correct debugging output. 2004-10-05 02:10:15 +00:00
Christopher Faylor 298cac75d5 fix erroneous checkin 2004-10-04 14:06:02 +00:00
Christopher Faylor 34421ac3e5 * include/cygwin/signal.h: Add siginterrupt definition. 2004-10-04 14:04:31 +00:00
Pierre Humblet e49bc789b2 2004-10-02 Pierre Humblet <pierre.humblet@ieee.org>
* path.h (enum path_types): Delete PATH_ISDISK.
	(path_conv::isdisk): Delete method.
	(path_conv::set_isdisk): Ditto.
	* path.cc (path_conv::check): Do not call set_isdisk.
	* uinfo.cc(pwdgrp::load): Do not call pc.isdisk.
2004-10-02 02:20:21 +00:00
Christopher Faylor e3e443e4df * fhandler_termios.cc (fhandler_termios::tcsetpgrp): Disallow attempts to set
the process group to a nonexistent process group.
2004-09-28 04:41:42 +00:00
Corinna Vinschen 2b94cfce89 * lib/_cygwin_crt0_common.cc: Revert patch from 2004-09-16. Brakes
newly built DLLs.
2004-09-27 16:30:44 +00:00
Christopher Faylor 98fc1a6dfe Sergey Ivanov <seriv@parkheights.dyndns.org>
* path.cc (mount_info::read_cygdrive_info_from_registry): Default /cygdrive to
binary mode.
2004-09-24 19:41:19 +00:00
Pierre Humblet 20e474d7b8 2004-09-22 Pierre Humblet <pierre.humblet@ieee.org>
* path.cc (normalize_win32_path): Only look for : in second position.
	Avoid infinite loop with names starting in double dots.
	(mount_info::conv_to_win32_path): Do not worry about a trailing dot.
	(hash_path_name): Ditto.
2004-09-23 00:32:08 +00:00
Christopher Faylor 0ae97cf7dd * exceptions.cc (sig_handle_tty_stop): Set flag earlier. 2004-09-20 05:35:46 +00:00
Christopher Faylor ac652b501a . 2004-09-20 05:31:17 +00:00
Christopher Faylor e58412a2a0 * exceptions.cc (sig_handle_tty_stop): Set flag that we are in a cygwin
function to avoid a probably erroneous stack walk.
2004-09-20 04:58:36 +00:00
Corinna Vinschen af444ab7be * syscalls.cc (unlink): Don't use "delete on close" on remote shares. 2004-09-17 09:10:53 +00:00
Corinna Vinschen 95a12a8594 * cygwin.din (_impure_ptr): And export again. There are libs out there. 2004-09-17 08:34:31 +00:00
Corinna Vinschen 368ffbe3d8 * cygwin.din (_impure_ptr): Don't export.
(reent_data): Export.
	* lib/_cygwin_crt0_common.cc (_impure_ptr): Drop entirely.  Don't
	initialize _impure_ptr or u->impure_ptr_ptr.
2004-09-16 09:14:29 +00:00
Christopher Faylor 22a1a24f10 * cygwin.din (_impure_ptr): Export.
(reent_data): Don't export.
* dcrt0.cc (reent_data): Drop.
(__cygwin_user_data): Initialize impure_ptr as GLOBAL_REENT.
(_dll_crt0): Initialize _impure_ptr as GLOBAL_REENT.
* lib/_cygwin_crt0_common.cc (_impure_ptr): Drop.  Declare extern as dllimport
instead.
2004-09-16 03:49:03 +00:00
Christopher Faylor a9f36d288c * cygtls.h: Add alignment kludge to fix disparity between compilers.
* tlsoffsets.h: Regenerate.
* fork.cc (slow_pid_reuse): Use define to control number of pids held to
prevent pid reuse.
2004-09-14 23:44:50 +00:00
Corinna Vinschen 599b41c4ec * autoload.cc (EnumProcessModules): Add.
* dlfcn.cc (dlsym): Handle RTLD_DEFAULT using EnumProcessModules().
	* include/dlfcn.h (RTLD_DEFAULT): Define to NULL.
2004-09-14 08:29:12 +00:00
Christopher Faylor fc3a42749f * fork.cc (slow_pid_reuse): Temporarily double the number of pids held to
prevent pid reuse.
2004-09-14 02:21:09 +00:00
Christopher Faylor de4e88a8df trivia change to force a new snapshot 2004-09-13 15:14:38 +00:00
Christopher Faylor a5eb75d60c * sigproc.cc (wait_sig): Ensure that waiting threads are awoken after returning
from a hold condition.
2004-09-12 19:34:08 +00:00
Christopher Faylor 3d65bb97e8 * child_info.h (CURR_CHILD_INFO_MAGIC): Update. 2004-09-12 18:10:15 +00:00
Christopher Faylor 013688df40 check in file missing from previous checkin. 2004-09-12 03:55:42 +00:00
Christopher Faylor d584454c82 * exceptions.cc: (ctrl_c_handler): Do nothing while a Cygwin subprocess is
starting.
* child_info.h (init_child_info): Remove pid argument from declaration.
* cygheap.h (init_cygheap::pid): New element.
* dcrt0.cc (dll_crt0_0): Eliminate handling of now-noexistent cygpid parameter
in child_info struct.  Set forkee to 'true' rather than cygpid since the pid
value was never used.
(dll_crt0_1): Ditto.
(_dll_crt0): Ditto.
* fork.cc (fork_child): Don't wait for sigthread.  This is handled in the fork
call now.
(fork_parent): Remove obsolete pid argument from init_child_info call.  Don't
do anything special with cygpid when DEBUGGING.
(fork): Delay all signals during fork.
(fork_init): Don't do anything special when DEBUGGING.
* pinfo.cc (set_myself): Remove pid parameter.  Use new pid field in cygheap.
(pinfo_init): Don't pass pid argument to set_myself.
* sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as
sendsig.
(init_child_info): Eliminate handling of pid.
(wait_sig): Implement method to temporarily hold off sending signals.
* sigproc.h (__SIGHOLD): New enum.
(__SIGNOHOLD): Ditto.
* spawn.cc (spawn_guts): Remove obsolete pid argument from init_child_info
call.
2004-09-12 03:47:57 +00:00
Corinna Vinschen d495ee9ff0 * fhandler.cc (fhandler_base::dup): Use debug_printf. 2004-09-10 08:34:37 +00:00
Corinna Vinschen 4875a4b66e * Makefile.in: Create libutil.a from bsdlib.o exports.
* bsdlib.cc (logwtmp): Move from syscalls.cc to here.
	(login): Ditto.
	(logout): Ditto.

	* winsup.h (EXPORT_ALIAS): New macro.
	* exec.cc: Define alias symbols using EXPORT_ALIAS macro.
	* syscalls.cc: Ditto.
	* times.cc: Ditto.
2004-09-10 08:30:51 +00:00
Corinna Vinschen 1f97020ae6 * fhandler_tape.cc (fhandler_dev_tape::open): Fix typo. 2004-09-09 11:35:15 +00:00
Corinna Vinschen 6423296840 * pipe.cc (create_selectable_pipe): Work around bug in Windows 95
where CreateNamedPipe returns NULL.
2004-09-09 08:58:44 +00:00
Pierre Humblet a456320915 2004-09-05 Pierre Humblet <pierre.humblet@ieee.org>
* cygheap.h (cwdstuff::drive_length): New member.
        (cwdstuff::get_drive): New method.
        * path.cc (normalize_win32_path): Simplify by using cwdstuff::get_drive.
        (mount_info::conv_to_win32_path): Use cwdstuff::get_drive as default for /.
        (cwdstuff::set): Initialize drive_length.
2004-09-07 23:26:28 +00:00
Christopher Faylor 6f7a746cee * cygtls.cc (_cygtls::init_thread): Set __sdidinit to negative value to
indicate that it is "special".
* thread.cc (pthread::exit): If __sdidinit is < 0, it was never really
initialized so reset it to 0 before calling _reclaim_reent.
2004-09-07 04:05:14 +00:00
Christopher Faylor dda37cd219 * include/cygwin/version.h: Bump DLL minor number to 12. 2004-09-05 16:08:44 +00:00
Corinna Vinschen eea5dd9707 * security.cc: Fix a few more strace_prints. 2004-09-03 08:18:41 +00:00
Christopher Faylor 0cd9f74fa5 Regularize most strace_prints throughout so that %E is always preceded by a
comma and elminate most uses of "foo = %s" to "foo %s".
2004-09-03 01:53:12 +00:00
Christopher Faylor 6644c628f5 Christopher Faylor <cgf@timesys.com>
* autoload.cc (NtQueryInformationFile): Return nonzero on error.
* ntdll.h (FILE_PIPE_LOCAL_INFORMATION): Add.
(NtQueryInformationFile): Fix types for last two arguments.
* pipe.cc: Include stdlib.h, limits.h, and ntdll.h.
(create_selectable_pipe): New function to create a pipe that can be used with
NtQueryInformationFile for select.
(fhandler_pipe::create): Call create_selectable_pipe instead of CreatePipe.
(pipe): Use DEFAULT_PIPEBUFSIZE as argument to create_pipe.
* select.cc: Include limits.h and ntdll.h.
(peek_pipe): Add select_printf output.  Call NtQueryInformationFile to
implement select for write on pipes.
(fhandler_pipe::select_read): Reorder field assignments to be consistent with
fhandler_pipe::select_write.
(fhandler_pipe::select_write): Initialize startup, verify, cleanup, and
write_ready fields for select_record.
(fhandler_pipe::select_except): Tweak indentation to be consistent with
fhandler_pipe::select_write.
2004-09-03 01:32:02 +00:00
Christopher Faylor 72067ccafa * fork.cc (fork_parent): Return the cygpid directly derived from the winpid. 2004-08-31 03:34:04 +00:00
Christopher Faylor 1af912ce3c * fork.cc (fork_parent): Record child's pid when we're sure that it has been
filled out by the child.
* pinfo.cc (pinfo::init): Trivial change.
2004-08-30 22:08:50 +00:00