View Single Post
Old 01-05-2012, 04:35 PM   #15
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,058
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
@J.C.
It never occurred to me try this under the emulator (I have to build on a separate machine for that), so this is the first I've seen of these problems.

Something very strange is going on in the emulated program. Using strace, I can see the output being written to stdout if it isn't redirected. If it is redirected (with '>' or e.g. 'FILE=``'), then strace shows that the write never takes place to any file descriptor. The emulator code just swallows it. It looks like I can get around it by dup'ing stdout and writing to that descriptor instead. Sigh! Such a short program, and it's already kludgy! I'll post here when the changes are uploaded.
rkomar is offline   Reply With Quote