首页
\
问答
\
后台进程可以在同一个shell中启动前台进程吗?(Can a background process launch a foreground process in the same shell?)
后台进程可以在同一个shell中启动前台进程吗?(Can a background process launch a foreground process in the same shell?)
在一个系统中:
- 前台进程 - 让我们调用这个进程
Main()
- 在xterm中运行启动后台进程Monitor()
- 通过数据库,
Monitor()
可以检测远程中断并杀死Main()
- 稍后,数据库可以指示
Monitor()
Main()
使用不同的参数重新启动Main()
约束是:
Main()
必须始终在前台运行,并且,- 不允许启动新的xterm来启动
Main()
那么问题是: 后台进程可以在同一个xterm / shell中启动一个新的前台进程吗?
TCSH是首选,但Bash也是可以接受的。
In a system:
- A foreground process -- let's call this process
Main()
-- running in an xterm launches a background processMonitor()
- Via a database, it is possible for
Monitor()
to detect a remote interrupt and killMain()
- At a later point, the database can instruct
Monitor()
to relaunchMain()
with different parametersThe constraints are:
Main()
must always run in the foreground, and,- Launching a new xterm to launch
Main()
is not allowedThe question, then, is: Can a background process launch a new foreground process in the same xterm/shell?
TCSH is preferred, but Bash is also acceptable.
原文:https://stackoverflow.com/questions/26620955
更新时间:2023-11-22 09:11
最满意答案
CSS期望百分比或像素,而JS只返回数值。 您需要将“px”或“%”附加到
left
,top
,right
和bottom
变量中存储的值。CSS is expecting percentages or pixels, and JS is returning just the numeric value. You need to append 'px' or '%' to the values you're storing in the
left
,top
,right
, andbottom
vars.
相关问答
更多-
您可以使用简单的减法计算任何曲面的相对鼠标位置。 请考虑以下示例: import pygame pygame.init() screen = pygame.display.set_mode((400, 400)) rect = pygame.Rect(180, 180, 20, 20) clock = pygame.time.Clock() d=1 while True: for e in pygame.event.get(): if e.type == pygame.QUIT: ...
-
如何在可滚动的div元素中使用CSS绝对位置(How to use CSS absolute position inside a scrollable div element)[2022-02-18]
你必须设置position: relative; 在父div上,让子元素相对于它移动。 实际情况是,只要未使用默认static位置,就可以将父div设置为任何用户定义的位置。 You must set position: relative; on the parent div to get the child elements to move in relation to it. The reality is, you can have the parent div set to any user-defi ... -
我正在添加一个新答案,因为即使它受到旧答案的启发,我认为这个值得拥有。 所以,我意识到我只能使用方法getWantedParts而没有其余的,但我不满意递归,这可能会导致复杂的减法问题。 新代码: function subtractMulti(aTargetRect, aSubtractRectsArr) { var keptParts = [aTargetRect]; for (var i = 0; i < aSubtractRectsArr.length; i++) { ...
-
相对/绝对位置css(转换区域元素rect坐标)(relative/absolute position css (convert area element rect coordinates))[2022-11-17]
CSS期望百分比或像素,而JS只返回数值。 您需要将“px”或“%”附加到left , top , right和bottom变量中存储的值。 CSS is expecting percentages or pixels, and JS is returning just the numeric value. You need to append 'px' or '%' to the values you're storing in the left, top, right, and bottom vars. ... -
相对位置内的绝对位置,元素是否超出父宽度?(Absolute position inside relative position, element goes over parent's width?)[2022-04-05]
div left父级的原因是width为100% , left被赋予默认值('auto') - 在这种情况下,由于padding ,这是20px 。 所以div会在父容器外流出20px 。 要阻止这种情况的发生,你可以设置left: 20px和right: 20px (与填充相同)并移除width: 100% The reason the div goes outside of the parent is there is a width of 100% and left is being assigned ... -
将area元素转换为div(converting area element to div)[2022-11-02]
你需要在显示它之前附加你的div,例如附加到body : var elementDiv = $('') .css({position: 'absolute', left: left, top: top}). width(wid).height(hei); $("body").append(elementDiv ); elementDiv.hide(); eleme ... -
onmouseover区域显示鼠标坐标处的div内容[关闭](onmouseover area shows div content at mouse coordinates [closed])[2020-01-05]
http://jsfiddle.net/tX25a/2/ div=document.getElementsByTagName('div')[0]; btShow=document.getElementsByTagName('button')[0]; btHide=document.getElementsByTagName('button')[1]; btShow.onclick=function(){ document.body.onmousemove=function(event){ ... -
使用位置的坐标值(Using coordinates values for position)[2024-02-09]
var coord = area.getAttribute( 'coords' ).split( ',' ); 这将创建一个包含所有coords值的数组。 然后,您可以通过coord[0]访问最高值,使用coord[1]访问左侧值。 var coord = area.getAttribute( 'coords' ).split( ',' ); This creates an array with all values of coords. You can then access the top valu ... -
尝试给每个.row一个height属性 .row { position: relative; height:1em; } http://jsfiddle.net/gTp2t/ div未明确设置时通常具有零或零高度效果。 Try giving each .row a height attribute .row { position: relative; height:1em; } http://jsfiddle.net/gTp2t/ divs typically have ...
-
如何不剪切和居中图像? img.clipped { background:url(https://www.google.nl/images/srpr/logo3w.png) center center no-repeat; } 实例: http : //jsfiddle.net/bd3Ms/1/ 更多替代方案: 绝对中心(垂直和水平)图像 http://css-tricks.com/snippets/css/absolute-center-vertical-horizontal-an-image/ ...