Hacker News new | past | comments | ask | show | jobs | submit login

> It is - until you want to do something interesting, then it's all ioctl(), recv(), and the various gather calls!

Indeed, Plan9 and inferno don't have ioctls. For special operations ("control"), there is often a file named "ctl" to which you can write commands. So you open the file, write some text, see if the write succeeds, and close the file. E.g. to make a tcp connection, to flush a write buffer to disk, etc. The commands are typically just plain ascii. That's easy for scripting and there is no need to import C struct types into that new programming language you are using/developing. Of course, the commands have to be parsed (for kernel devices, this happens in the kernel), typically done with some simple tokenization functions. When the commands become complicated, you could still choose to write binary data, or even straight C structs...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: