LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 409|回复: 0

xterm 的 -S 选项该怎么用?

[复制链接]
发表于 2011-10-13 18:36:26 | 显示全部楼层 |阅读模式
看起来挺有意思,能重用已有的 pty?但是试了试没有成功 。

熟悉xterm的能不能给个具体的应用例子?

谢谢

       -Sccn   This option allows xterm to be used as an input and output channel for an existing program and is  sometimes
               used  in specialized applications.  The option value specifies the last few letters of the name of a pseudo-
               terminal to use in slave mode, plus the number of the inherited file descriptor.  If the option  contains  a
               "/"  character,  that  delimits  the  characters used for the pseudo-terminal name from the file descriptor.
               Otherwise, exactly two characters are used from the option for the pseudo-terminal name,  the  remainder  is
               the file descriptor.  Examples (the first two are equivalent since the descriptor follows the last "/"):

                   -S/dev/pts/123/45
                   -S123/45
                   -Sab34

               Note  that  xterm  does not close any file descriptor which it did not open for its own use.  It is possible
               (though probably not portable) to have an application which passes an open file  descriptor  down  to  xterm
               past the initialization or the -S option to a process running in the xterm.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表