kill linux process by c sharp


ref https://stackoverflow.com/questions/43139976/how-to-kill-linux-properly-c-sharp

        RunLinuxCmd("/usr/bin/pkill -f EBoard");

        private static bool RunLinuxCmd(string arg)
        {

            Process process = new Process();
            process.StartInfo.FileName = "/usr/bin/sudo";
            process.StartInfo.Arguments = arg;
            process.Start();
            return true;

        }

留言

熱門文章