On Mon, 12 Apr 2010, Pritpal Bedi wrote: Hi,
> > hb_processRun( <cCommand>, [ <cStdIn> ], [ @<cStdOut> ], [ @<cStdErr> > > ], ; > > [ <lDetach> ] ) -> <nResult> > > <lDetach> must not be .T. if you do not want to execute process in > > background (as daemon). > > This command is implemented for all platforms. > If <lDetach> == .F. then the process will run under hbIDE's process space, > right? > If yes, then when the control will return to hbIDE ? Immediately after > initiating the process > or after initiated process will terminate? Look at parameters. They give you the answer. To set <cStdOut>, <cStdErr> and <nResult> is necessary to wait inside hb_processRun() until executed command terminates. If you want to still execute your foreground process then use: hb_processOpen( <cCommand>, ; [ @<hStdIn> ], [ @<hStdOut> ], [ @<hStdErr> ], ; [ <lDetach> ], [ @<nPID> ] ) -> <hProcess> | F_ERROR and then: hb_processValue( <hProcess> [, <lWait=.T.> ] ) -> <nResult> or: hb_processClose( <hProcess> [, <lGentle=.T.> ] ) -> <lTerminated> <hStdIn>, <hStdOut> and <hStdErr are file handles from which you can read and write using FREAD()/FWRITE(). <nResult> is value returned by executed process (errorLevel()), <lWait> is .T. by default, <lGentle> is .T. by default, when it's .F. the process is killed unconditionally. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour