我有一个运行在我的linux服务器上的java程序,jar是带有"&“的星体,现在正在后台运行,通过使用htop,我也可以看到它。现在,我尝试了作业或fg让任务回到前台,但没有成功。知道我做错什么了吗?
erdo@localhost:~$ jobs -l
erdo@localhost:~$ fg 45502
-bash: fg: 45502: no such job
在开发Rails 4.1.6项目时,我可以使用以下方法启动Webrick服务器:
rails s
在服务器处理任何请求之前,我可以:
用控制停止它-C
用control-Z挂起它
在服务器处理完请求之后,我仍然可以用control停止它,但不能再用control挂起它。键入control-Z将"^Z“回显到终端,但服务器继续运行,并将处理它接收到的任何请求。
-Z为什么在服务器处理请求后无法挂起服务器?
详细信息
启动服务器:
$ rails s
Warning: NLS_LANG is not set. fallback to US7ASCII.
=> Boot
我有一个打开MyMessageAlert类型表单的线程。这个表单是一个弹出窗口,当我调用它时会打开它。它有一个定时器,在30秒后调用一个方法CloseWindow()。
m_messagAlert = new MyMessageAlert();
ParameterizedThreadStart thStart = new ParameterizedThreadStart(m_messagAlert.setMessage);
Thread thread = new Thread(thStart);
thread.Start(strMessage); //at this point, the M
class Program
{
public static void Main(String[] args)
{
var c = new C();
var thread = new Thread(new ThreadStart(c.F));
thread.Start();
Console.WriteLine("Exiting main, but the program won't quit yet...");
}
}
class C
{
public void F()