我正在设计一个脚本来在命名的屏幕会话中启动进程.
as_user "screen -p 0 -S **$command** -X eval 'stuff \"wine LFS.exe /cfg=**$command**.cfg\"\015'"
Run Code Online (Sandbox Code Playgroud)
因此,bash myscript.sh start test将创建一个名为test的屏幕并test.cfg使用该软件运行.
现在我希望我的脚本访问特定的屏幕会话并执行CTRL+ C以停止正在运行的进程,以便我可以终止屏幕会话.
像这样的东西:
as_user "screen -p 0 -S **$command** **... kill the process with ctrl-c...**"
as_user "screen -p 0 -S **$command** -X eval 'stuff \"exit\"\015'"
Run Code Online (Sandbox Code Playgroud) SecurityManager.PolicyHierarchy()会生成一个关于过时的警告,但在用于比较接收和当前策略级别时,我无法找到替换它的方法或如何替换它.
例如
SecEnumerator levelEnumerator = SecurityManager.PolicyHierarchy();
while (levelEnumerator.MoveNext())
{
PolicyLevel Seclevel = levelEnumerator.Current as PolicyLevel;
if (Seclevel == Init.Seclevel)
{
return;
}
}
Run Code Online (Sandbox Code Playgroud)
对于这样的应用,现在应该使用其他方法吗?