3 ms·
Thanks for the submission, I've missed this previous times it has been posted. I'm currently in the process of writing my own shell so if anyone has any other
by laumars 10y ago
Thanks for the submission, I've missed this previous times it has been posted.
I'm currently in the process of writing my own shell so if anyone has any other good resources you'd recommend then I'd be hugely grateful :) (the simpler the better too hehehe)
- lutusp 10y agoWhen writing shells it's possible to invoke standard libraries on both ends of the circuit to handle these communications/protocol issues without having to rewrite them.
- laumars 10y agoI've got file streams working, that's the easy part. However I'm having issues with console applications that detect and require a PTY. Also handling ncurses is causing me a bit of bother.
- deleted 10y ago[deleted]
- vram22 10y agoNot sure from your question, whether you are only looking for resources on TTYs, or general resources on writing a Unix shell. If the latter, this book is quite good: Search for "advanced unix programming marc rochkind" and also see this specific page (it's one of the hits of that search): http://basepath.com/aup/ http://basepath.com/aup/ I had read it some years ago. (It used to come bundled with HP-UX servers and workstations, and I was working in an HP joint venture, so got to read it and try out some of the stuff.) Thought it was really good. Gave a lot of insights into appropriate use of Unix system calls. An example used in the book is creating a simple shell (covers right ways to fork, exec, dup, set up pipes with the pipe system call, etc.). (IIRC, there's even another one about creating a simple client-server DBMS!) And IIRC, he showed a good bit about writing code portable between different versions of Unix, in a sane way.
- laumars 10y agoThank you. I think resources on writing a Unix shell is probably a good place to start :)