Mail Archives: cygwin/2009/10/15/12:35:38
Charles Wilson wrote:
> the daemonized one. If I launch <cmd line> and then attach strace to
> the eventual pid of the daemonized process, it hangs (both strace and
> the process).
How about "gdb --attach PID"? Does that succeed? GDB has the advantage of
being a Cygwin rather than Win32 exe, which might make it work better when
taking hold of the running process.
> For some reason, if I launch the original program in
> non-daemon mode, I can't get it to work at all, strace or not -- I'm
> probably invoking it incorrectly, but I can't see how from the man page.
Well, that's pretty dubious right there; I'd focus on solving that problem
first, you want to be sure you've got all the basics correctly working before
you try to debug it in a more complicated environment such as running daemonized.
> I'm not familiar at all with procmon (sysinternals, right?) but I'll
> look into it.
Yep, it's dead useful for making sure that stuff at least starts up, and you
can often get a clue how far the code has got by seeing what handles it's
opened and syscalls its made.
> P.S. I fear I'm doing something wrong in my cygwin CVS builds,
Didn't spot anything terribly suspicious there I'm afraid.
> Care to post your recipe, Dave? I'm sure it's more up-to-date than the
> FAQ...
It's nothing special: roughly, since I'm doing this purely from memory
untested, it goes like so -
${src}/configure -v --prefix=/usr
make -j6
make DESTDIR=`pwd`/.inst install
cd .inst/usr
mv etc ..
mv i686-pc-cygwin/{include,lib} .
rmdir i686-pc-cygwin
rm include/iconv.h
^^^^^^^^^^^^^^^^^^^^^ v.important that last one
cd bin/
cp ../../i686-pc-cygwin/winsup/cygwin/cygwin1.dbg .
rename cygwin1 cygwin1-`date +%Y%m%d` cygwin1*
cd ../..
tar cfvj cygwin1-`date +%Y%m%d`.tar.bz2 etc/ usr/
tar -C / -xjf cygwin1-`date +%Y%m%d`.tar.bz2
Then I exit my final bash shell and rename the new dll and dbg files in
place using cmd.exe.
cheers,
DaveK
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -