Difference between revisions of "CANCELPID()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to cancel a sub-process
 
Function to cancel a sub-process
 
  
 
==Syntax==
 
==Syntax==
 
CANCELPID(<expN>)
 
CANCELPID(<expN>)
 
  
 
==See Also==
 
==See Also==
 
[[ACTIVEPID()]], [[GETGID()]], [[GETPID()]], [[GETUID()]], [[SPAWN]], [[SPAWNPID()]]
 
[[ACTIVEPID()]], [[GETGID()]], [[GETPID()]], [[GETUID()]], [[SPAWN]], [[SPAWNPID()]]
 
  
 
==Description==
 
==Description==
 
The CANCELPID() function returns .T. if the specified process ID <expN> could be "killed" and .F. otherwise.  The SPAWNPID() function is used to get the process ID of the last process spawned.
 
The CANCELPID() function returns .T. if the specified process ID <expN> could be "killed" and .F. otherwise.  The SPAWNPID() function is used to get the process ID of the last process spawned.
 
  
 
==Example==
 
==Example==
Line 30: Line 26:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Disk and File Utilities]]
+
[[Category:Environment Functions]]
[[Category:Disk and File Utilities Functions]]
+
[[Category:Lianja VFP Extensions]]
 +
[[Category:VFP Function Extensions]]

Latest revision as of 07:03, 10 December 2012

Purpose

Function to cancel a sub-process

Syntax

CANCELPID(<expN>)

See Also

ACTIVEPID(), GETGID(), GETPID(), GETUID(), SPAWN, SPAWNPID()

Description

The CANCELPID() function returns .T. if the specified process ID <expN> could be "killed" and .F. otherwise. The SPAWNPID() function is used to get the process ID of the last process spawned.

Example

spawn db program
m_activepid = spawnpid()
if activepid(m->m_activepid)
    if cancelpid(m->m_activepid)
        dialog box "Process Canceled."
    else
        dialog box "Process couldn't be Canceled."
    endif
else
    dialog box "There is no Process Active."
endif