(LOGO.JPG) Python for OpenVMS

(go to: table of contents, index, list of vms_sys, prev: BRKTHRUW, next: CLREF)


CANWAK - Cancel Wakeup


Removes all scheduled wakeup requests for a process from the timer queue, including those made by the caller or by other processes. The Schedule Wakeup (SYS$SCHDWK) service makes scheduled wakeup requests.

Format:

    targpid = vms_sys.canwak ([pidadr] [,prcnam])
Returns:
targpid
Process identification of process for which wakeups have been canceled. The targed PID (targpid) is always returned - it is as if you have specified a '0' value for the 'pidadr' argument. If an error happens, then vms_sys.canwak() raises a Python exception.
Arguments:
pidadr
Process identification of process for which wakeups are to be canceled.
prcnam
Process name of process for which wakeups are to be canceled.
Examples:
>>> import vms_sys

>>> print vms_sys.canwak ()
341                     <-- CANWAK on current process

>>> print vms_sys.canwak (None,None)
341                     <-- CANWAK on current process

>>> print vms_sys.canwak (387)
387
>>> vms_sys.canwak (None,'TARG_PRC')
387
>>> vms_sys.canwak (0,'TARG_PRC')
387

>>> print vms_sys.canwak (0)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_sys.error: (340, '%SYSTEM-F-IVLOGNAM, invalid logical name')
--> Argument 1 = 0 or None means that Argument 2 should have a valid
    process name.

>>> print vms_sys.canwak (None)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_sys.error: (340, '%SYSTEM-F-IVLOGNAM, invalid logical name')
--> Argument 1 = 0 or None means that Argument 2 should have a valid
    process name.

>>> vms_sys.canwak (1,2)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
TypeError: argument 2: expected read-only buffer, int found

>>> nonexist_pid = 99
>>> vms_sys.canwak (nonexist_pid)
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_sys.error: (2280, '%SYSTEM-W-NONEXPR, nonexistent process')

>>> vms_sys.canwak (None,'NONEXPRC')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
vms_sys.error: (2280, '%SYSTEM-W-NONEXPR, nonexistent process')
>>>

(go to: table of contents, index, list of vms_sys, prev: BRKTHRUW, next: CLREF)

27-SEP-1998 ZE.