最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How do I launch a process in C# on Linux where the launching process can end without killing the child process? - Stack Overflow

programmeradmin1浏览0评论

I have a C# app that runs in Linux. It must, at some point, start another app as a separate process, and then exit itself.

Every time I try to do this, the new process dies with the old one. I've tried various settings in the ProcessStartInfo, but nothing seems to help.

Here's what I'm currently doing:

var procStartInfo = new ProcessStartInfo( program, arguments )
{
  UseShellExecute = true,
  WorkingDirectory = workingDir
};

_ = Process.Start( procStartInfo );

When I do this, both apps end when the launching app ends.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论