On Jan 15, 2008 9:41 AM, Przemyslaw Czerpak <[EMAIL PROTECTED]> wrote:

> I need self contain example. Can I see tt52.prg?
> Was hbrun linked with HB_EXECVP()?

Here is tt52.prg:

proc main()
local aPID:={}, i
? "Started"
for i:=1 to 5
  ? i
  aadd( aPID, HB_EXECVP( "hbrun" ) ) // here I use an Harbour gtxwc/gttrm app
  hb_idlesleep(2)
next
__run("ps xa|grep avm.exe|grep -v grep")
hb_idlesleep(3.5)
?
__run("ps xa|grep avm.exe|grep -v grep")
for i:=1 to len(aPID)
  if HB_WAITPID( aPID[i], .t. ) > 0
     ? "Process: ", ltrim( str( aPID[i] ) ), "died."
  else
     ? "Killing process:", ltrim( str( aPID[i] ) ), "..."
     ?? iif( HB_KILL(aPID[i],15), " done", "error" )
     HB_WAITPID( aPID[i] )
     ?? ", process terminated"
  endif
next
__run("ps xa|grep avm.exe|grep -v grep")
?
return

I've added HB_EXECVP, HB_KILL, HB_WAITPID to include/hbextern.ch

Many thanks for the help.

best regards,
Lorenzo
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to