task manager, app doesn't unload

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ray well

    task manager, app doesn't unload

    on my developing system, when my app exits, it always gets removed withing a
    second from the task manager. on my clients machine, the app exits but stays
    indefinitely in the task manager.

    i tried every which way to kill the process, i did all of the following to
    no avail:

    in the module whose sub main loads the form and then starts
    Application.Run (), i made an exit sub, in whichi set the app form to
    Nothing, i set the apps class to nothing, t then lookd for the apps process
    to kill it by

    Dim proc, procs() As Process

    procs = Process.GetProc essesByName("My AppName")

    For Each proc In procs

    proc.Kill()

    Next

    and finally i ended with

    Application.Exi t()



    and still the app lives on in the task manager and eats up resouces, though
    i can't see how it is running

    without hiring a hitman, how do i kill off this app?

    ray








  • William DePalo [MVP VC++]

    #2
    Re: task manager, app doesn't unload

    "ray well" <nospam@nospam. comwrote in message
    news:u%23$V%238 WGHHA.3976@TK2M SFTNGP05.phx.gb l...
    on my developing system, when my app exits, it always gets removed withing
    a
    second from the task manager. on my clients machine, the app exits but
    stays
    indefinitely in the task manager.
    >
    i tried every which way to kill the process, i did all of the following to
    no avail:
    >
    in the module whose sub main loads the form and then starts
    Application.Run (), i made an exit sub, in whichi set the app form to
    Nothing, i set the apps class to nothing, t then lookd for the apps
    process
    to kill it by
    >
    Dim proc, procs() As Process
    >
    procs = Process.GetProc essesByName("My AppName")
    >
    For Each proc In procs
    >
    proc.Kill()
    >
    Next
    >
    and finally i ended with
    >
    Application.Exi t()
    >
    >
    >
    and still the app lives on in the task manager and eats up resouces,
    though
    i can't see how it is running
    >
    without hiring a hitman, how do i kill off this app?
    All of which begs the question as to why you need to do this. Kill() is a
    last resort. It should be used sparingly.

    With such a mindless loop can you really be certain that you are not
    killing, or trying to kill, something important?

    Is it that you are trying to shutdown the system? If so, there are better
    ways.

    Regards,
    Will


    Comment

    • Ben Voigt

      #3
      Re: task manager, app doesn't unload


      "William DePalo [MVP VC++]" <willd.no.spam@ mvps.orgwrote in message
      news:uaQ93OYGHH A.4904@TK2MSFTN GP04.phx.gbl...
      "ray well" <nospam@nospam. comwrote in message
      news:u%23$V%238 WGHHA.3976@TK2M SFTNGP05.phx.gb l...
      >on my developing system, when my app exits, it always gets removed
      >withing a
      >second from the task manager. on my clients machine, the app exits but
      >stays
      >indefinitely in the task manager.
      >>
      >i tried every which way to kill the process, i did all of the following
      >to
      >no avail:
      >>
      >in the module whose sub main loads the form and then starts
      >Application.Ru n(), i made an exit sub, in whichi set the app form to
      >Nothing, i set the apps class to nothing, t then lookd for the apps
      >process
      >to kill it by
      >>
      >Dim proc, procs() As Process
      >>
      >procs = Process.GetProc essesByName("My AppName")
      >>
      >For Each proc In procs
      >>
      >proc.Kill()
      >>
      >Next
      >>
      >and finally i ended with
      >>
      >Application.Ex it()
      >>
      >>
      >>
      >and still the app lives on in the task manager and eats up resouces,
      >though
      >i can't see how it is running
      >>
      >without hiring a hitman, how do i kill off this app?
      >
      All of which begs the question as to why you need to do this. Kill() is a
      last resort. It should be used sparingly.
      >
      With such a mindless loop can you really be certain that you are not
      killing, or trying to kill, something important?
      No, the OP is trying to kill only applications with a particular process
      name ("MyAppName" ).

      Try attaching a debugger to the zombie task and see what threads are running
      and where.
      >
      Is it that you are trying to shutdown the system? If so, there are better
      ways.
      >
      Regards,
      Will
      >

      Comment

      • William DePalo [MVP VC++]

        #4
        Re: task manager, app doesn't unload

        "Ben Voigt" <rbv@nospam.nos pamwrote in message
        news:OAxIQzjGHH A.2632@TK2MSFTN GP06.phx.gbl...
        >With such a mindless loop can you really be certain that you are not
        >killing, or trying to kill, something important?
        >
        No, the OP is trying to kill only applications with a particular process
        name ("MyAppName" ).
        My bad. Well then that's better.

        Still, if the target is something written by the OP there are better ways to
        go.

        And if it is not, it's at best rude, at worst risky.

        Regards,
        Will


        Comment

        • Ben Voigt

          #5
          Re: task manager, app doesn't unload


          "William DePalo [MVP VC++]" <willd.no.spam@ mvps.orgwrote in message
          news:uUl1sZkGHH A.4760@TK2MSFTN GP03.phx.gbl...
          "Ben Voigt" <rbv@nospam.nos pamwrote in message
          news:OAxIQzjGHH A.2632@TK2MSFTN GP06.phx.gbl...
          >>With such a mindless loop can you really be certain that you are not
          >>killing, or trying to kill, something important?
          >>
          >No, the OP is trying to kill only applications with a particular process
          >name ("MyAppName" ).
          >
          My bad. Well then that's better.
          >
          Still, if the target is something written by the OP there are better ways
          to go.
          I believe the OP already said the app had been told to exit, but it was
          hanging. He needs to attach a debugger to the app while it's hung to find
          out what went wrong in the exit path.
          >
          And if it is not, it's at best rude, at worst risky.
          >
          Regards,
          Will
          >
          >

          Comment

          Working...