[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

401.0. "Where did I come from ?" by CHAMBR::GUINEAU () Wed Feb 04 1987 15:32


Is there a way for an executing program to tell if it was invoked
interactively by a user (at the $) or if it was invoked from
within a command procedure ?


T.RTitleUserPersonal
Name
DateLines
401.1$TRNLNMBRSSWS::LIDSKYJust send 3 box tops and $10,000...Thu Feb 05 1987 06:388
    
    
    You could translate the logical name SYS$INPUT.
    
    If run interactively the name will translate to a terminal.
    
    If run from a command procedure it will translate to a disk.
    
401.2CAFEIN::PFAUYou can't get there from hereThu Feb 05 1987 09:379
    Not necessarily.  If either of the following commands appear in
    the .COM file before the image is invoked, SYS$INPUT will equate
    to the terminal:
    
    	$ DEASSIGN SYS$INPUT
    or
    	$ ASSIGN[/USER] SYS$COMMAND SYS$INPUT
    
    tom_p
401.3Thats ItCHAMBR::GUINEAUThu Feb 05 1987 13:5412




	.1 looks good. The use here wouldn't redirect SYS$INPUT. If
	fact the program relies upon the file for input.


	Thanks!

	John