Difference between revisions of "SPAWNPID()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=SPAWNPID()=
 
 
 
==Class==
 
Environment
 
 
 
 
==Purpose==
 
==Purpose==
 
Function to return spawned process identity
 
Function to return spawned process identity
Line 15: Line 8:
  
 
==See Also==
 
==See Also==
[[SPAWN]], [[ACTIVEPID()]], [[CANCELPID() ]]
+
[[ACTIVEPID()]], [[CANCELPID()]], [[RUN]], [[SPAWN]]
  
  
Line 27: Line 20:
 
m_activepid = spawnpid()
 
m_activepid = spawnpid()
 
if activepid(m->m_activepid)
 
if activepid(m->m_activepid)
if cancelpid(m->m_activepid)
+
    if cancelpid(m->m_activepid)
dialog box "Process Canceled "
+
        dialog box "Process Canceled "
else
+
    else
dialog box "Unable to Cancel Process."
+
        dialog box "Unable to Cancel Process."
endif
+
    endif
 
else
 
else
dialog box "There is no Process Active".
+
    dialog box "There is no Process Active".
 
endif  
 
endif  
 
</code>
 
</code>
Line 39: Line 32:
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Disk and File Utilities]]
 +
[[Category:Disk and File Utilities Functions]]

Latest revision as of 16:27, 7 December 2009

Purpose

Function to return spawned process identity


Syntax

SPAWNPID()


See Also

ACTIVEPID(), CANCELPID(), RUN, SPAWN


Description

The SPAWNPID() function returns the identity of the last spawned process. The process identity returned can be used with the ACTIVEPID() or the CANCELPID() functions. A spawned process will only remain active while the user remains logged in to the system. All spawned processes will be terminated when the user logs out. See the RUN command for batch processing.


Example

spawn db program
m_activepid = spawnpid()
if activepid(m->m_activepid)
    if cancelpid(m->m_activepid)
        dialog box "Process Canceled "
    else
        dialog box "Unable to Cancel Process."
    endif
else
    dialog box "There is no Process Active".
endif


Products

Recital, Recital Server