How might the output problem be solved? It's not hard to keep programs from clobbering each other's formatted output [ideas below], but notifying the user of errors -- the only time output is actually important -- becomes a DWIM problem, and it's somewhat difficult to solve. I see 4 ways to solve the output-clobber: - abandon the multiprocessing idea. (Blah. I like it.) - holding output until it can be atomically (not really true) written to STDOUT. We might capture a startup script's output until it exits, then echo it to the screen (and two sister echos are unlikely to clobber each other, because they're so fast). This makes the console wooden, because there no pleasant feel of watching the processes start up _right_now_ -- everything you see is fait accompli. - send all output of each into: a named pipe, with a program listening on the other end that watches its input and arranges each's output on the screen in a pleasing way (each line coming in would have to have a tag at the beginning to indicate what it is, of course) - build the allocation-of-screen-space and arrangement-of-output into the initmake/minimake program -- much easier, and much more elegant! (So, add curses to the dependancy list.) Of course, I like the last one (because it's so hard to program). Here's how I think it should look: I don't pretend to offer how to program it, note! For each processes we're spawning, capture its output and allocate a line initially for it, and keep track of it, growing the space (and moving down lower entries as needed) as it uses it, up to some upper bound determined by the number of siblings and screen size. Upon completion, visually mark it in some way as finished and about to be removed. For a similar program, consider the appearance of 'ytalk' running with several participants. - chad -- Chad Miller <cmiller@surfsouth.com> URL: http://web.chad.org/ (GPG) "Any technology distinguishable from magic is insufficiently advanced". First corollary to Clarke's Third Law (Jargon File, v4.2.0, 'magic')
Attachment:
pgpONyAYbLEcF.pgp
Description: PGP signature