dvdhrm / kmscon

Linux KMS/DRM based virtual Console Emulator
http://www.freedesktop.org/wiki/Software/kmscon
Other
433 stars 81 forks source link

Add psuedo terminal support #6

Closed bluetech closed 12 years ago

bluetech commented 12 years ago

Hi, So I felt like plugging a real shell might be the next logical step. I know you're working on this too, but its pretty straightforward so I did it myself. If you haven't got something like this locally, then have a look :)

The first four commits are pretty simple preparatory stuff. The final commit makes vte.c handle all the pty stuff on its own and report to the terminal object when necessary. I had to make some changes along the way, hopefully they are fine.

Also, I wasn't entirely sure what your intentions were regarding unicode handling and which subsystem should do what, specifically the utf-8 conversion. So I just ignored it here for now, but it's mostly orthogonal to this series.

Thanks, Ran

[Added a couple of commits that slipped me yesterday, specifically I forgot to waitpid().]

dvdhrm commented 12 years ago

I have picked up the miscellaneous fixes but I am not very happy with the pty implementations. Why don't you put the pty API in a different file (vte_pty.c or so)? Use a kmscon_pty structure and this will then be used by the vte object. I don't like using the vte structure for pty handling. I will add some more inline comments tomorrow but I want to finish my OpenGL to OpenGLESv2 conversion first.

It is also much easier for me to review patches if they are split up into logical patches and not just one big patch. This means using many "git rebase"s during development, but if the patches are clean and small, the code will always be bisectable, stable and reviewable.

Cheers David