[mod.computers.apollo] CRP eats typeahead?

dennis%cod@NOSC.ARPA (Dennis Cottel) (09/19/86)

I have a /bin/csh script which CRPs onto another node to run a program
which is only licensed for that node.  If I type ahead of the display
manager input window, the typeahead is somehow thrown away.  This is
painful as I'd like to stack a bunch of calls to this script to be
executed one after the other (they take a while to run).

Can anyone explain why this happens, and if it can be fixed?  I have
included a cut down version of the CRP call line below.  I need to
use the -CP option as I have to wait for the CRPed program to finish
to do some further processing.

    #!/bin/csh
    :
    : (handle shell script arguments, preprocessing)
    :
    crp "/com/converter -args" -on //node -me -cp -nwp -n progname
    :
    : (postprocessing of CRP results)

Thanks,
	Dennis Cottel  Naval Ocean Systems Center, San Diego, CA  92152
	(619) 225-2406     dennis@nosc.ARPA      sdcsvax!noscvax!dennis

rps@apollo.UUCP (Robert Stanzel) (09/22/86)

    I have a /bin/csh script which CRPs onto another node to run a program
    which is only licensed for that node.  If I type ahead of the display
    manager input window, the typeahead is somehow thrown away.  This is
    painful as I'd like to stack a bunch of calls to this script to be
    executed one after the other (they take a while to run).

CRP redirects all four standard streams to the remote process.
Hence your typeahead is being sent along, though your program isn't using it.

    Can anyone explain why this happens, and if it can be fixed?
    ...
    crp "/com/converter -args" -on //node -me -cp -nwp -n progname

The easiest fix is to redirect standard input from /dev/null:

    crp "/com/converter -args" -on //node -me -cp -nwp -n progname < /dev/null


"We walk backwards, say nothing
 We're young and strong in this Party"

Rob Stanzel             ARPA:  rps%apollo@eddie.mit.edu
Apollo Computer         UUCP:  ...{wanginst,mit-eddie}!apollo!rps
-------

mishkin@apollo.UUCP (Nathaniel Mishkin) (09/23/86)

    I have a /bin/csh script which CRPs onto another node to run a program
    which is only licensed for that node.  If I type ahead of the display
    manager input window, the typeahead is somehow thrown away.  This is
    painful as I'd like to stack a bunch of calls to this script to be
    executed one after the other (they take a while to run).
    
The problem is that the current version of "crp" reads any input as
it is entered and sends it to the remote process regardless of whether
that process has actually asked to read anything from standard input.
This is at best a nuisance (it makes for a disorderly transcript) and
at worst a bug (for cases like yours).

Odds are quite high that this will be fixed in a future release.  For now,
it should work if you simply redirect the standard input of crp to
"/dev/null".  E.g.:

    crp "/com/converter -args" -on //node -me -cp -nwp -n progname </dev/null

                -- Nat Mishkin
                   Apollo Computer Inc. 

-------