closing programs in dos

  1. #11
    si-bot is offline Newbie

    Re: closing programs in dos

    Hey all,

    Found this thread via google, and since it helped sort out my problem (which wasn't anywhere near related to excel macro's!)...thought i'd add my 2 cents in case someone else runs into something similar.

    Problem:

    "start" command was needed because a process fired by a Subversion server hook event (post-commit) was waiting for the process to be completed before letting the client know all was well...The post-commit hook was sending emails so this was taking a while (too long)....The start command fixes this delay problem...but as mentioned, also leaves an empty dos shell on the server. Ugly and a resource waste (and eventually you would run out of resources).

    Solution:

    Run "start" with the /b parameter

    This means your program stays within the current shell, that way it's far (far!) easier to grab the PID - because it's the current process - and then kill it.

    If you want to see the code (it's open source), slurf to:

    batch file example

    and

    custom NAnt task at the bottom - search for "killprocess"



    peace
    si

  2. #12
    si-bot is offline Newbie
    Further testing revealed that you don't even need to kill the process (so long as it terminates)...so even cleaner!

+ Reply to Thread
Page 2 of 2 FirstFirst 1 2