I knew I was asking for trouble by forking and not execing, and even more trouble by messing around with the file descriptors for stdin/out/err in the child process. I crossed the i's and dotted the t's and sacrificed the goats, and that seems to have prevented everything that I knew could go wrong, but this ... this is new and different and I have no fraggin' clue how to fix it: data written to stdout is showing up in a different stdio-opened file, one that has never had anything to do with stdin or out or err. But only part of it, and only intermittently, and (of course) never under strace.
no subject
Date: 2007-08-17 06:10 am (UTC)I've forgotten what a FILE consists of, but I do know fd is one of its members.
Or it could likely be ghosts.
no subject
Date: 2007-08-19 09:52 am (UTC)no subject
Date: 2007-08-19 05:48 pm (UTC)If you're running under Linux, your distro may have gcore, but you may also want to look at Google's coredumper, which will (I believe) allow you to programmatically create a core file using a function call.