roy@phri.UUCP (Roy Smith) (10/04/87)
I'm attempting to get a program which uses stdio to work when undumped on a Sun-3, running SunOS-3.2. I'm using the version of undump which comes on the U. of W. TeX tape, by Spencer Thomas, with various hackings by der Mouse and by myself to make it work on a Sun-3. I'm reasonably sure there is nothing wrong with undump since undumped TeX works. The problem is, all my printf calls seem to get ignored. I can see printf get called with the proper arguments using dbx, but nothing is printed. Since the stdio library maintains its own set of buffers, I can see all sorts of way printf might get confused by undump. Is it possible to use printf in an undumped program? Any special tricks I need to make it work? Closing all open files before dumping and using fdopen to get std{in,out,err} back when it starts up again is the next thing I'm going to try. Even if it works I'd like to hear if other people think this is portable (not that I'm sure anything having to do with undump can really be considered portable), hence this note. -- Roy Smith, {allegra,cmcl2,philabs}!phri!roy System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016