X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4AD752C8.2040908@gmail.com> Date: Thu, 15 Oct 2009 17:50:16 +0100 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: fork failure? References: <4AD732C7 DOT 4020301 AT cwilson DOT fastmail DOT fm> <4AD73B83 DOT 9060505 AT gmail DOT com> <4AD74586 DOT 8070803 AT cwilson DOT fastmail DOT fm> In-Reply-To: <4AD74586.8070803@cwilson.fastmail.fm> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Charles Wilson wrote: > the daemonized one. If I launch 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