newlib/winsup/utils
Christopher Faylor 5d97040501 *** cygwin DLL Changes:
* child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
(child_info::dwProcessId): Delete.
(child_info::straced): New variable.
(child_info::handle_fork): New member function.
* dcrt0.cc (in_forkee): New global variable.
(__cygwin_user_data::forkee): Mark as obsolete.
(do_global_ctors): Use in_forkee rather than user_data->forkee.
(get_cygwin_startup_info): Ditto.  Deal with new straced field to allow strace
to deal with children of attached processes.
(initial_env): Accommodate changes to strace::hello.
(child_info_fork::handle_fork): Rename from plain old 'handle_fork'.  Move
alloc_stack() call elsewhere.
(dll_crt0_0): Fill out more of user_data.  Reference handle_fork via fork_info.
Add some debugging output.
(_dll_crt0): Don't wait for sync thread if sync_startup is invalid.  Zero
sync_startup here.  Call alloc_stack() here, if appropriate.
(dll_crt0_1): Use in_forkee rather than user_data->forkee.
(dll_crt0): Ditto.
* malloc_wrapper.cc (malloc_init): Ditto.
* dll_init.cc (in_forkee): Remove local static version of this variable.
(dll_list::load_after_fork): Don't set in_forkee here.
* external.cc (cygwin_internal): Use strace method rather than accessing field
directly.
* fhandler.cc (fhandler_base::read): Ditto.
* fhandler_tty.cc (fhandler_tty_common::__acquire_output_mutex): Ditto.
* fork.cc (frok::parent): Invoke strace write_childpid to communicate with
potential strace.
(child_copy): Add more detail to debugging output.
* init.cc (calibration_id): New static variable.
(prime_threads): Set sync_startup to invalid handle if we already know about
thread_func_ix.  Use static calibration_id to hold calibration thread id.
* munge_threadfunc (munge_threadfunc): Don't try to debug if we don't find
threadfunc_ix.
(dll_entry): Avoid calling munge_threadfunc and _cygtls::remove on non-cygwin
threads invoked during process startup.
* pinfo.cc (set_myself): Always call strace.hello here regardless of DEBUGGING.
* sigproc.cc (child_info::child_info): Remove spurious handling of dwProcessId.
Set straced as appropriate.
* spawn.cc (spawn_guts): Rename ciresrv to ch.  Invoke strace write_childpid to
communicate with potential strace.
* strace.cc: Include child_info.h.
(strace::hello): Remove inited test.  Use active() method to test if strace has
been activated.  Handle case where we are started before
(mypid): New function.
(strace::vsprntf): Try to deal more intelligently with case where progname may
not be filled out.  Put pid in parentheses if it is a windows pid rather than a
cygwin pid.  myself has been filled out.
(strace::write_childpid): New function for notifying strace about the creation
of children.
(strace::vprntf): Use strace method rather than accessing field directly.
(strace_printf): Ditto.
(strace::wm): Ditto.
* winsup.h (in_forkee): Declare.
* include/sys/strace.h (strace::write_childpid): Declare new function.
(strace::attached): Define new function.
(strace::active): Ditto.
(strace::active_val): Ditto.
(_STRACE_ON): Delete.
(_STRACE_OFF): Ditto.
(define_strace0): Use strace method rather than accessing field directly.
(strace_printf_wrap): Ditto.
(strace_printf_wrap1): Ditto.

*** cygwin utils changes:
* strace.cc (nprocesses): Make static global.
(quiet): New variable.
(strace_active): Ditto.
(add_child): Increment nprocesses here.  Don't add a child if it is already
added (windows bug?).  Report on child if not quiet.
(get_child): Just return NULL if child not found.
(remove_child): Report on child if not quiet.
(attach_process): Don't complain if given a windows process.  Use windows pid
in error.
(handle_output_debug_string): Issue error if trying to manipulate a process
that we don't know about.  Handle _STRACE_CHILD_PID - attach to reported child
when we get this.
(proc_child): Move nprocesses to file scope.  Report on exceptions.
(longopts): Implement "--quiet".
(opts): Implement "-q".
(main): Manipulate quiet flag.
* utils.sgml (strace): Add words describing '-q'.
2005-12-29 20:46:34 +00:00
..
ChangeLog *** cygwin DLL Changes: 2005-12-29 20:46:34 +00:00
ChangeLog-2000 * regtool.cc (translate): Ensure that 'c' is initialized. 2001-01-10 14:20:16 +00:00
Makefile.in * Makefile.in: Link cygcheck with libwininet.a. 2005-11-22 17:19:17 +00:00
aclocal.m4 import winsup-2000-02-17 snapshot 2000-02-17 19:38:33 +00:00
configure preliminary checkin 2003-07-26 00:28:59 +00:00
configure.in preliminary checkin 2003-07-26 00:28:59 +00:00
cygcheck.cc * cygcheck.cc (common_apps): Add crontab, vi, vim. 2005-12-29 19:23:46 +00:00
cygpath.cc * Makefile.in: Link cygcheck with libwininet.a. 2005-11-22 17:19:17 +00:00
dump_setup.cc * dump_setup.cc (package_find): Fix is_alias computation for "/usr/lib". 2005-12-19 16:58:33 +00:00
dumper.cc fix whitespace, update some copyrights 2004-10-25 15:49:36 +00:00
dumper.h * dumper.h: Update copyright notice. 2001-08-30 16:47:51 +00:00
getfacl.c * getfacl.c (main): Correct layout when nopt is set. 2004-09-15 07:51:06 +00:00
ipcrm.c * Makefile.in: Add rules to build ipcrm and ipcs. 2003-11-19 18:50:52 +00:00
ipcs.c * Makefile.in: Add rules to build ipcrm and ipcs. 2003-11-19 18:50:52 +00:00
kill.cc * kill.cc (getsig): Rectify bug introduced by 2005-02-26 change. Don't pad 2005-03-08 04:06:26 +00:00
mkgroup.c Align error message handling to mkpasswd's error messages throughout. 2005-09-21 22:26:08 +00:00
mkpasswd.c Align error message handling to mkpasswd's error messages throughout. 2005-09-21 22:26:08 +00:00
module_info.cc * Makefile.in: Add define to CXXFLAGS. 2001-12-11 22:51:01 +00:00
mount.cc * mount.cc (longopts): Fix typo which disallows --options option. 2005-08-03 09:23:39 +00:00
parse_pe.cc * parse_pe.c (exclusion::sort_and_check): Remove crude cast. 2005-06-14 12:42:57 +00:00
passwd.c * passwd.c (longopts): Add --logonserver option. 2005-08-18 20:25:43 +00:00
path.cc * path.cc (getmntent): Add previously-omitted 'noexec' and 'managed'flags to 2005-04-29 16:39:34 +00:00
path.h * Makefile.in (strace.exe): Include mingw_getopt.o in link line. 2003-03-04 05:30:50 +00:00
ps.cc * ps.cc (main): Eliminate use of PID_ZOMBIE. 2005-01-16 17:13:51 +00:00
regtool.cc * regtool.cc: Extend copyright-years. 2005-09-08 09:24:41 +00:00
setfacl.c * getfacl (main): Remove extern declaration of optind. 2003-09-11 07:55:51 +00:00
ssp.c 2004-05-29 John Paul Wallington <jpw@gnu.org> 2004-05-30 06:33:02 +00:00
ssp.txt Cleanup formatting on some files. Remove excessive whitespace. 2000-10-28 05:00:00 +00:00
strace.cc *** cygwin DLL Changes: 2005-12-29 20:46:34 +00:00
umount.cc * cygcheck.cc (usage) Add description output. 2003-04-26 21:52:03 +00:00
utils.sgml *** cygwin DLL Changes: 2005-12-29 20:46:34 +00:00