{"id":4741,"date":"2014-03-30T15:02:43","date_gmt":"2014-03-30T15:02:43","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/process-close-is-not-terminating-created-processc-collection-of-common-programming-errors\/"},"modified":"2014-03-30T15:02:43","modified_gmt":"2014-03-30T15:02:43","slug":"process-close-is-not-terminating-created-processc-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/process-close-is-not-terminating-created-processc-collection-of-common-programming-errors\/","title":{"rendered":"Process.Close() is not terminating created process,c#-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve written a C# application which uses System.Diagnostics.Process class to create a process, using<\/p>\n<pre><code> Process P1 = new Process();\n P1.FileName = \"myexe.exe\";\n<\/code><\/pre>\n<p>and other proper settings.<\/p>\n<p>I&#8217;ve linked it to an exe file which runs for about 10 minutes. (I&#8217;m writing program to measurer runtime of programs). Now in between i want to abort the running process. So I wrote in the cancel button&#8217;s event,<\/p>\n<pre><code> Process.Close();\n<\/code><\/pre>\n<p>But in the task manager i still see myexe.exe running, it doesn&#8217;t get aborted. What to do?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve written a C# application which uses System.Diagnostics.Process class to create a process, using Process P1 = new Process(); P1.FileName = &#8220;myexe.exe&#8221;; and other proper settings. I&#8217;ve linked it to an exe file which runs for about 10 minutes. (I&#8217;m writing program to measurer runtime of programs). Now in between i want to abort the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4741","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4741"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4741\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}