Linux - 自动将进程发送到后台

时间:2013-10-14 22:09:34

标签: linux

当我运行命令(即apt-get update)时,我的服务器自动将进程发送到后台(就好像我附加了& to the command)。你们有没有遇到过这个问题?我四处搜索,找不到与此相关的任何内容。这是在Wheezy服务器上。

以下是自动发送到后台的命令输出示例:

debian-transmission@emachine-debian:~$ flexget --discover-now
2013-10-10 23:15 VERBOSE  discover      tv_shows        Discovering 38 titles ...
2013-10-10 23:15 INFO     discover      tv_shows        Ignoring interval because of --discover-now
2013-10-10 23:15 VERBOSE  est_series    tv_shows        The X Factor (US) S03E11 does not exist in tvrage database, assuming unreleased
2013-10-10 23:15 INFO     task          tv_shows        Plugin discover has requested task to be ran again after execution has completed.
2013-10-10 23:15 VERBOSE  est_series    tv_shows        The Walking Dead S03E17 does not exist in tvrage database, assuming unreleased
2013-10-10 23:15 VERBOSE  est_series    tv_shows        Supernatural S06E23 does not exist in tvrage database, assuming unreleased
2013-10-10 23:15 VERBOSE  est_series    tv_shows        Falling Skies S03E11 does not exist in tvrage database, assuming unreleased

[1]+  Stopped                 flexget --discover-now

1 个答案:

答案 0 :(得分:0)

您的FlexGet和apt-get命令可能是别名,或者您可能有一个shell脚本拦截它们。是否有任何其他命令在后台开始(关于ls,touch,mkdir等等)?

  • alias flexget,alias apt-get
  • 哪个flexget,哪个apt-get
  • 档案which flexget,档案which apt-get

查看FlexGet(http://flexget.com/wiki/Plugins/exec),它建议允许后台选项,但表示你(可能)需要'start'命令。

  • 允许后台选项

*通常,FlexGet将等待给定的命令完成,以便它可以捕获返回状态并记录输出。但是如果命令需要很长时间才能运行(例如直接下载大文件),它将阻止进一步处理,直到命令完成。要将命令分叉到后台进程以便FlexGet继续处理而不会延迟,您不仅需要在命令末尾添加&符号(&),还必须使用{{allow_background}}选项。请注意,此选项还会阻止FlexGet确定命令是否失败,因此不会重试。*

  • 您可能需要启动命令

*如果您在处理任务时遇到问题,请尝试使用“start”命令。在上面的例子中,设置“allow_background:yes”并附加&仍然不会介绍这个过程。*