Thursday Apr 30, 2009

Tip: Different master pty regards between Solaris and Linux

转载时请以超链接形式标明文章原始出处和作者信息
http://blogs.sun.com/weixue/entry/tip_differece_master_pty_regards

During investigation Opensolaris bug 6824625. The root cause is the different result of calling tcsetattr() for pty on Solaris and Linux.
Solaris and Linux treat slave pty differently.
For opening pty (Pseudo Terminal), there have two steps, open master device and slave device sequently. On Solaris, master pty device is not regarded as a terminal device. it regard slave device as a terminal device only.
But On Linux(I tested on Ubuntu), both master and slave devices are regarded as terminal devices.

So, tcsetattr() can work for both master and slave device on Linux. But, tcsetattr() can only work for slave pty device on Solaris. You can also use isatty() to tests if file descriptor is associated with terminal device .

It's a useful tip for porting terminal application between Solaris and Linux.

A piece of code for your reference, how to open pty: You can see that ioctl() only apply to slave device on Solaris(in macro #ifdef __sun).

FYI.

The Open Group Base Specifications : General Terminal Interface.
Concept of pty, tty..(in Chinese)

Friday Apr 24, 2009

Which terminal emulator do you need?

转载时请以超链接形式标明文章原始出处和作者信息
http://blogs.sun.com/weixue/entry/which_terminal_emulator_do_you

During doing many terminal(emulator) evaluation, I found there are so many terminal emulator. And most of these support i18n feature. That means you can use it to display of input international languages character. Currently, the goal of evaluation is to weight which terminal should be high priority to be integrated in Opensolaris. Of course, there are some terminal emulator are not be listed. such like iterm, fbterm. If you need, I'll add them. Please see FOSS terminal evaluation. Hope you could leave comment to let me know which terminal is you favorate and which terminal you would like to be integrated in Opensolaris.

Your comments would be appraciated. Btw, if any xi18n support terminal I haven't listed , please let me know!.Thanks!

About

williamxue

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today