As per a discussion yesterday with Chris, I've added a new option to strace, -T or --toggle, to toggle tracing in a process already being straced.
One other change I made was to replace a use of ExitProcess() with exit() --- otherwise some error messages didn't appear since the stdio buffers weren't being flushed. I've also updated the section for strace in utils.sgml. I know that Joshua has been holding off on changing utils.sgml (see http://sources.redhat.com/ml/cygwin-patches/2002-q2/msg00276.html) so I don't know whether you want this update or not. It's not much more than a cut and paste from the usage message in strace.cc. ChangeLog appended here and attached (to keep its format out of Outlook's clutches). // Conrad 2002-06-07 Conrad Scott <[EMAIL PROTECTED]> * strace.cc (toggle): New global variable. (error): Use exit instead of ExitProcess so that stdio buffers get flushed. (create_child): Remove command line error checking. (dostrace): Ditto. (dotoggle): New function. (usage): Add entry for new option -T|--toggle. Alphabetize. (longopts): Add new option -T|--toggle. (opts): Ditto. (main): Handle new -T|--toggle option. Move all command line checking here from other functions. * utils.sgml: Update section for strace.
strace.patch
Description: Binary data
utils.patch
Description: Binary data
2002-06-07 Conrad Scott <[EMAIL PROTECTED]> * strace.cc (toggle): New global variable. (error): Use exit instead of ExitProcess so that stdio buffers get flushed. (create_child): Remove command line error checking. (dostrace): Ditto. (dotoggle): New function. (usage): Add entry for new option -T|--toggle. Alphabetize. (longopts): Add new option -T|--toggle. (opts): Ditto. (main): Handle new -T|--toggle option. Move all command line checking here from other functions. * utils.sgml: Update section for strace.