Asynchronous problem



I am trying to shell a program as so

nResult = shell(" mcrypt.exe", 0)

This works fin but then I want to kill its temp file once it is finished. As
we all know Shell is asynchronous so I have this untill the user closes the
program.

while(tasks.exists(""mcrypt.tmp"))
' Delay
wend

Then the kill

Kill("mcrypt.tmp")

Single stepping through this it appears to work perfectly but in realtime
the kill gives me a 'Path/File access error' intermittently which means my
delay is not working properly. It appears to get to the kill after the
program has been removed from the task list but before it has actually
ended. Is there a better way around this?

And does anybody know what exactly is the task ID returned by the shell
command. It does not appear to have anything to do with the tasks.item
method

Many thanks


.



Relevant Pages

  • Re: Asynchronous problem
    ... ' Delay ... This works fin but then I want to kill its temp file once it is finished. ... And does anybody know what exactly is the task ID returned by the shell ...
    (microsoft.public.word.vba.general)
  • SUMMARY: Why does ksh coredump on kill -0 ?
    ... Thanks to Kris Smith, Roberto Romani, Bob Vickers and Dr Thomas Blinn for their helpful answers. ... it causes the shell to dump core. ... Betreff: Re: Why does ksh coredump on kill -0? ...
    (Tru64-UNIX-Managers)
  • Re: Asynchronous problem
    ... This works fin but then I want to kill its temp file once it is finished. ... we all know Shell is asynchronous so I have this untill the user closes ...
    (microsoft.public.word.vba.general)
  • Re: bg proccess limit
    ... > i mean limit the background proccesses amount ... ... i work in a shell ... > providing company but can`t find suitable solution for the BSD ... results of the same grep through tail to find some processes to kill off. ...
    (freebsd-isp)
  • Re: Redirecting output from "kill" command?
    ... that's written to stderr by the parent shell whose child has been killed, ... not by the kill command itself. ... Pid 25165 is the parent shell, pid 25797 is the sleep process which we ...
    (comp.unix.misc)