|
| | | | W A I T B A C K
| | | | |
waitback-0.4
-------------
---
If you ever wanted to synchronise background processes you surely know that
this is not an easy task. OS comes with the 'wait' command that allows just
to delay script execution while the process is taking off in a separate
context. But you never know if that process started for sure... Would not
it be better to sync as fast as possible and have some feedback on that?
With 'waitback' this is really simple and your 'startup-sequence' can now
execute programs in correct order and even be optimized for speed!
---
NEWS:
[21-Mar-2011] 0.4 * Totally enhanced, 'qdev' assisted version which
fixes long sync.
[09-Mar-2009] 0.3 * Cleaner, better, quicker.
[25-May-2008] 0.2 * Last example didnt work, due to fact that the
value was 0(no checks...).
---
NOTES:
[*]
Requires 68020(no FPU)+, OS2.04(theoretically)+, 32+ kilos of free memory.
[*]
Comma delimiter means 'and', a logical and. Negation can be made with
patterns per entry.
[*]
Proggy is especially useful when made resident so actions can take place
immediately even when OS is very busy.
---
HELP:
> waitback ?
COM=TASK/A,ARG=OPTS,CS=CASE/S,IC=ICHAR/S,TIMEOUT/N
COM=TASK/A - Comma separated task/proc. or CLI(square bracket braced)
names(standard patterns allowed) or address(4097 onwards)
or CLI numbers(1 to 4096).
ARG=OPTS - Action to be performed. Currently defined actions are:
;
T - Wait for tasks or processes only(default)
P - Wait for public message ports only
B - Wait for either tasks/processes and/or ports
CS=CASE/S - Turn on case sensitivity. By default case has no matter.
IC=ICHAR/S - Perform intercharacter matching instead of standard
name comparison.
TIMEOUT/N - Give up after n seconds(5 by default). Passing 0 will
trigger one time check.
---
USAGE:
; Sync to background CLI command
run >NIL: wait 10
waitback [wait]
; Sync to some Workbench process
wbrun multiview
waitback multiview
; Sync to Multiview message port
run multiview
waitback MULTIVIEW.#? p
; Check for WB and MagicMenu
waitback Workbench,MagicMenu
; Try to detect IDEFIX in the OS
waitback >NIL: IDEFIX 0
if warn
echo "Process not found!"
else
echo "Process found!"
endif
---
megacz
| |
| | | | |
|