  
  [1X5 [33X[0;0YInteractive ANUPQ functions[133X[101X
  
  [33X[0;0YHere  we  describe  the  interactive functions defined by the [5XANUPQ[105X package,
  i.e. the functions that manipulate and initiate interactive [5XANUPQ[105X processes.
  These  are  functions that extract information via a dialogue with a running
  [10Xanu-pq[110X  process (process used in the UNIX sense). Occasionally, a user needs
  the  [21Xnext step[121X; the functions provided in this chapter make use of data from
  previous  steps  retained  by  the [10Xanu-pq[110X program, thus allowing the user to
  interact  with  the  [10Xanu-pq[110X  program  like  one can when one uses the [10Xanu-pq[110X
  program as a stand-alone (see [10Xguide.dvi[110X in the [10Xstandalone-doc[110X directory).[133X
  
  [33X[0;0YAn  interactive  [5XANUPQ[105X  process  is  initiated by [10XPqStart[110X and terminated via
  [10XPqQuit[110X;  these  functions  are  described  in  ection [14X'[33X[0;0YStarting and Stopping
  Interactive ANUPQ Processes[133X'[114X.[133X
  
  [33X[0;0YEach   interactive  [5XANUPQ[105X  function  that  manipulates  an  already  started
  interactive  [5XANUPQ[105X  process,  has  a  form  where  the first argument is the
  integer [3Xi[103X returned by the initiating [10XPqStart[110X command, and a second form with
  one  argument  fewer  (where  the  integer  [3Xi[103X  is  discovered  by  a default
  mechanism,  namely  by  determining the least integer [3Xi[103X for which there is a
  currently  active interactive [5XANUPQ[105X process). We will thus commonly say that
  [21Xfor  the  [3Xi[103Xth  (or  default)  interactive  [5XANUPQ[105X  process[121X a certain function
  performs  a given action. In each case, it is an error if [3Xi[103X is not the index
  of an active interactive process, or there are no current active interactive
  processes.[133X
  
  [33X[0;0Y[13XNotes[113X: The global method of passing options (via [10XPushOptions[110X), should not be
  used with any of the interactive functions. In fact, the [10XOptionsStack[110X should
  be empty at the time any of the interactive functions is called.[133X
  
  [33X[0;0YOn  [9Xquit[109Xting  [5XGAP[105X,  [10XPqQuitAll();[110X  is  executed,  which terminates all active
  interactive  [5XANUPQ[105X  processes. If [5XGAP[105X is killed without [9Xquit[109Xting, before all
  interactive  [5XANUPQ[105X  processes are terminated, [13Xzombie[113X processes (still living
  [13Xchild[113X processes whose [13Xparents[113X have died), may result. Since zombie processes
  do consume resources, in such an event, the responsible computer user should
  seek  out  and terminate those zombie processes (e.g. on Linux: [10Xps xw | grep
  pq[110X  gives  you  information  on  the  [10Xanu-pq[110X  processes corresponding to any
  interactive [5XANUPQ[105X processes started in a [5XGAP[105X session; you can then do [10Xkill [3XN[103X[10X[110X
  for each number [3XN[103X appearing in the first column of this output).[133X
  
  
  [1X5.1 [33X[0;0YStarting and Stopping Interactive ANUPQ Processes[133X[101X
  
  [1X5.1-1 PqStart[101X
  
  [33X[1;0Y[29X[2XPqStart[102X( [3XG[103X, [3Xworkspace:[103X [3Xoptions[103X ) [32X function[133X
  [33X[1;0Y[29X[2XPqStart[102X( [3XG:[103X [3Xoptions[103X ) [32X function[133X
  [33X[1;0Y[29X[2XPqStart[102X( [3Xworkspace:[103X [3Xoptions[103X ) [32X function[133X
  [33X[1;0Y[29X[2XPqStart[102X( [3X:[103X [3Xoptions[103X ) [32X function[133X
  
  [33X[0;0Yactivate  an  iostream for an interactive [5XANUPQ[105X process (i.e. [10XPqStart[110X starts
  up  a  [10Xanu-pq[110X  process and opens a [5XGAP[105X iostream to [21Xtalk[121X to that process) and
  returns an integer [3Xi[103X that can be used to identify that process. The argument
  [3XG[103X  should  be  an  [13Xfp  group[113X or [13Xpc group[113X that the user intends to manipulate
  using  interactive  [5XANUPQ[105X  functions.  If  the  function  is  called without
  specifying   [3XG[103X,   a   group   can   be   read   in  by  using  the  function
  [10XPqRestorePcPresentation[110X (see [2XPqRestorePcPresentation[102X ([14X5.6-3[114X)). If [10XPqStart[110X is
  given  an  integer argument [3Xworkspace[103X, then the [10Xanu-pq[110X program is started up
  with  a  workspace  (an integer array) of size [3Xworkspace[103X (i.e. [22X4 × [3Xworkspace[103X[122X
  bytes in a 32-bit environment); otherwise, the [10Xanu-pq[110X program sets a default
  workspace of [22X10000000[122X.[133X
  
  [33X[0;0YThe  only  [3Xoptions[103X  currently  recognised by [10XPqStart[110X are [10XPrime[110X, [10XExponent[110X and
  [10XRelators[110X  (see  Chapter [14X'[33X[0;0YANUPQ  Options[133X'[114X  for detailed descriptions of these
  options)  and  if  provided  they are essentially global for the interactive
  [5XANUPQ[105X  process,  except  that  any interactive function interacting with the
  process  and  passing new values for these options will over-ride the global
  values.[133X
  
  [1X5.1-2 PqQuit[101X
  
  [33X[1;0Y[29X[2XPqQuit[102X( [3Xi[103X ) [32X function[133X
  [33X[1;0Y[29X[2XPqQuit[102X(  ) [32X function[133X
  
  [33X[0;0Ycloses  the  stream  of  the  [3Xi[103Xth  or  default interactive [5XANUPQ[105X process and
  unbinds its [10XANUPQData.io[110X record.[133X
  
  [33X[0;0Y[13XNote:[113X  It  can  happen  that  the [10Xanu-pq[110X process, and hence the [5XGAP[105X iostream
  assigned  to  communicate with it, can die, e.g. by the user typing a [10XCtrl-C[110X
  while  the [10Xanu-pq[110X process is engaged in a long calculation. [10XIsPqProcessAlive[110X
  (see [2XIsPqProcessAlive[102X  ([14X5.2-3[114X))  is  provided to check the status of the [5XGAP[105X
  iostream  (and  hence  the status of the [10Xanu-pq[110X process it was communicating
  with).[133X
  
  [1X5.1-3 PqQuitAll[101X
  
  [33X[1;0Y[29X[2XPqQuitAll[102X(  ) [32X function[133X
  
  [33X[0;0Yis  provided  as  a  convenience,  to terminate all active interactive [5XANUPQ[105X
  processes with a single command. It is equivalent to executing [10XPqQuit([3Xi[103X[10X)[110X for
  all active interactive [5XANUPQ[105X processes [3Xi[103X (see [2XPqQuit[102X ([14X5.1-2[114X)).[133X
  
  
  [1X5.2 [33X[0;0YInteractive ANUPQ Process Utility Functions[133X[101X
  
  [1X5.2-1 PqProcessIndex[101X
  
  [33X[1;0Y[29X[2XPqProcessIndex[102X( [3Xi[103X ) [32X function[133X
  [33X[1;0Y[29X[2XPqProcessIndex[102X(  ) [32X function[133X
  
  [33X[0;0YWith  argument [3Xi[103X, which must be a positive integer, [10XPqProcessIndex[110X returns [3Xi[103X
  if it corresponds to an active interactive process, or raises an error. With
  no  arguments  it  returns the default active interactive process or returns
  [9Xfail[109X  and  emits a warning message to [10XInfo[110X at [10XInfoANUPQ[110X or [10XInfoWarning[110X level
  1.[133X
  
  [33X[0;0Y[13XNote:[113X   Essentially,   an   interactive   [5XANUPQ[105X   process  [3Xi[103X  is  [21Xactive[121X  if
  [10XANUPQData.io[[3Xi[103X[10X][110X is bound (i.e. we still have some data telling us about it).
  Also see [2XPqStart[102X ([14X5.1-1[114X).[133X
  
  [1X5.2-2 PqProcessIndices[101X
  
  [33X[1;0Y[29X[2XPqProcessIndices[102X(  ) [32X function[133X
  
  [33X[0;0Yreturns  the  list  of  integer  indices  of  all  active  interactive [5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         