[Gambas-user] Shell Wait without Freeze Program
Bruce Steers
bsteers4 at gmail.com
Tue May 18 20:48:18 CEST 2021
PS.
Remember to call the following command to kill the process handler either
after use or in the Form_Close() event.
*If myProc Then myProc.Kill*
or or program may not exit cleanly.
BruceS
On Tue, 18 May 2021 at 19:36, Bruce Steers <bsteers4 at gmail.com> wrote:
>
>
> On Tue, 18 May 2021 at 15:26, Hasan Merkit <hasanmerkit at outlook.com>
> wrote:
>
>> Very thanks Bruce Steers,
>>
>>
>>
>> I used your recommended codes:
>>
>>
>>
>> 'myProc = Shell "bash -c
>> /home/hasanmerkit/.teteosnet/temp/piluxupdate_up_" & InstallingUpdateID &
>> ".sh"
>>
>> myProc = Shell "gedit"
>>
>>
>>
>> StateCheck:
>>
>> If myProc.State = Process.Running Then
>>
>> Print "running"
>>
>> Sleep 1
>>
>> Goto StateCheck
>>
>> Else
>>
>> Print "ending"
>>
>> Endif
>>
>>
>>
>> But i terminated “gedit”, and continue returning Process.Running = True.
>>
>> Print myProc.Running : printing 1
>>
>> Print myProc.State : printing 1
>>
>>
>>
>
> That is odd.
> I found the same running pluma
>
> it was not expected but i never use the *Sleep* command.
>
> If you use
>
> *Wait 1*
>
> Not
>
> Sleep 1
>
>
> It works
>
> BruceS
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210518/0c5d23b6/attachment.htm>
More information about the User
mailing list