[Gambas-user] need NOWAIT option for Process=Exec Command
Tobias Boege
taboege at ...626...
Sat Jan 17 20:36:39 CET 2015
On Sat, 17 Jan 2015, Lewis Balentine wrote:
> Well I am almost there and ran into a small hick-up. I am trying to
> create a program to schedule and record over the air (OTA) television
> broadcasts via ffmpeg and an IP based NTSC-Tunner (SiliconDust
> HDHR4-2US). If I use the GAMBAS statement:
> Exec Command
> then the ffmpeg command is executed and the recording takes place in the
> background as desired.
>
>
> My problem is that I need to get the Process ID for each recording
> session in order to be able to abort/cancel recording session(s). If I
> use the GAMBAS statement:
> Process = Exec Command
> then the program hangs up while it "waits" for the Command to complete
> (which might be a couple of hours).
>
> Now I am hung up. Is there another way to get the process id?
>
Doesn't happen over here as the attached script shows:
$ ./exec-nowait.gbs3
0.00100183486938
The Print line is executed obviously without waiting for the command to
complete. Does it work the same on your system? If not, there is a bug in
your copy of Gambas. If yes, it must be something deeper in your code.
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
-------------- next part --------------
#!/usr/bin/gbs3
Public Sub Main()
Dim h As Process
h = Exec ["sleep", "2"]
Print Timer
End
More information about the User
mailing list