wuz up!

16 views
Skip to first unread message

mzero

unread,
Apr 30, 2012, 11:08:45 AM4/30/12
to thecom...@googlegroups.com
Just thought I'd post my status:

I'm working on getting input to running commands solid. I spent most of the week fighting file descriptors:

The shell needs to control FDs 0 ~ 9, as the shell command language can refer to them by number. But almost all other software uses calls that just use the next available one. This meant that the GHC run-time system was opening up FDs in that range before main was even run. I now have a .c file that supplies main and runs before the GHC run-time, and "reserves" FDs 3~9 by opening /dev/null on 'em.

That change cascaded into a pile of clean up around the code's handling of FDs... and that work is almost done. Expect a check-in later this week.

The front-end side I wrote is janky: If a command is running, entering lines into the command input box will push them to stdin of the running program. The three character line "EOF" will close stdin. So now you can run "cat -" for example. This input mechanism is a hack, but improving it can be a separate task, perhaps after Jasvir's vt100 code goes in.

- Mark

Reply all
Reply to author
Forward
0 new messages