[Erlang危机](4.1)作业控制模式

Posted cynchanpin

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Erlang危机](4.1)作业控制模式相关的知识,希望对你有一定的参考价值。

原创文章,转载请注明出处:服务器非业余研究http://blog.csdn.net/erlib 作者Sunface
联系邮箱:[email protected]



Job Control Mode

作业控制模式

The Job Control Mode (JCL mode) is the menu you get when you press ?G in the Erlang shell. From that menu, there is an option allowing you to connect to a remote shell:

?作业控制模式(Job Control Mode,JCL)是在Erlang shell中按下Ctrl+G时出如今菜单。

里面有一个选项同意你连接到一个远程节点上:

--------------------------------------------------------------------------------------
([email protected])1>
User switch command
--> h
c [nn] - connect to job
i [nn] - interrupt job
k [nn] - kill job
j - list all jobs
s [shell] - start local shell
r [node [shell]] - start remote shell
q - quit erlang
? | h - this message
--> r ’[email protected]
--> c
Eshell Vx.x.x (abort with ^G)
([email protected])1>
--------------------------------------------------------------------------------------

When that happens, the local shell runs all the line editing and job management locally, but the evaluation is actually done remotely. All output coming from said remote evaluation will be forwarded to the local shell.
To quit the shell, go back in the JCL mode with ?G. This job management is, as I said, done locally, and it is thus safe to quit with ?G q:

?当完毕了上面代码中的操作后,那些看上去在本地shell完毕的输入,实际上是在远程节点上完毕的。所以本地节点显示的执行结果实际上是在远程节点操作返回的。


?假设要退出本地的shell,须要用Ctrl+G回到JCL模式,然后输入q退出本地节点(这样的操作是很安全的,仅仅会退出本地节点).

---------------------------------------------------------------

([email protected])1>
User switch command
--> q
--------------------------------------------------------------------------------------


You may choose to start the initial shell in hidden mode (with the argument -hidden) to avoid connecting to an entire cluster automatically.

?你能够使用hidden模式(使用參数:-hidden)启动一个shell。这样的情况下该shell默认是对其它节点隐藏的,这样就能够防止此shell自己主动连接到整个集群上了。

以上是关于[Erlang危机](4.1)作业控制模式的主要内容,如果未能解决你的问题,请参考以下文章

[Erlang危机](5.1.1)内存

[Erlang危机](4.2)Remsh

获取 badarith,[erlang,'+',[error,0],[],同时使用 Erlang 片段在 TSUNG 中执行算术运算

如何避免可怕的中年危机?成功入职阿里

《实时控制软件》第二周作业

为啥代码版本控制器在 erlang 中不起作用?