Sponsored Content
Full Discussion: trap command
Top Forums UNIX for Dummies Questions & Answers trap command Post 302537002 by Straitsfan on Wednesday 6th of July 2011 09:23:42 PM
Old 07-06-2011
I'm sorry to be so dense corona, but can you tell me what is meant by external command, foreground process, etc. I'm not sure the book is clear on this. Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using TRAP command

I'm using the trap command to capture any signals received whilst my script is running. How's the best way of writing the signal and any other error messages to a file/error log' without having to type '2>$1' on the command line after the script name? Cheers (3 Replies)
Discussion started by: dbrundrett
3 Replies

2. UNIX for Dummies Questions & Answers

trap command

i have the following script that displays the current time until the user presses CTR + c.... but it does not work properly.... Something is not right with the trap command... Help plz... :confused: # script to continuously display current time. # if script is terminated trap signal... (3 Replies)
Discussion started by: onlyc
3 Replies

3. UNIX for Dummies Questions & Answers

trap command

Dear All could you please explain me what does the trap command do and how I can write a program which can work as a trap command(in C Language). (1 Reply)
Discussion started by: mobile01
1 Replies

4. Programming

trap command in Unix

Could anybody tell me what the trap command does and how it performs the action it does. I had read the trap manual page but it is too concise that nothing is clear about it. Please tell how it works. (1 Reply)
Discussion started by: mobile01
1 Replies

5. Shell Programming and Scripting

Use of TRAP Command

Hi, I would like to know the use of TRAP command. I am very new to the UNIX environment. I have just started learning the basic. So please teach me in a very simple way to understand. Also i would like to know the use of following command: trap 'dialog --msgbox "Script Aborted1" 6 50 ;... (2 Replies)
Discussion started by: Deepakh
2 Replies

6. Shell Programming and Scripting

Cntl+z Trap is not detecting ??? Help required to add a trap detection ???

Hi folks, I have tried to add some trap detection in the below script....this script is used to monitor database activities...in a rather awkward way :rolleyes:.... The idea behind adding trap is that....this script creates lots of temporary files in the running folder to store the count... (1 Reply)
Discussion started by: frozensmilz
1 Replies

7. UNIX for Advanced & Expert Users

trap command

Hello experts! I need to know the use of trap command please In one of our program we have trap "rm -f temp1 ; exit 1" 1 2 15 0 and program always exit with 1 there is a rm -f temp1 as well at the end of the program as rm -f temp1 exit 0 when I test a probram with set... (4 Replies)
Discussion started by: ramshree01
4 Replies

8. Shell Programming and Scripting

trap command

dear all; I can't under stand what does "trap" command do: for example see below: trap "echo; echo no interrupts >&2; sleep 3" 2 3 15 Plz , can any body explain the action of this command? BR (3 Replies)
Discussion started by: ahmad.diab
3 Replies

9. Homework & Coursework Questions

VM trap may work differently than a pure install trap.

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: That is the last reply I received from my instructor, and I'm looking for some alternatives. When using... (2 Replies)
Discussion started by: newuser45
2 Replies

10. Shell Programming and Scripting

Trap command not working

Hi Folks - For some reason, my trap command is not working. It's placed just prior to a normal exit: #:: ------------------------------------------------------------------------ #::-- Script Name: LCM_Backup.sh #:: #::-- Description: This script leverages Utility.sh to perform LCM... (16 Replies)
Discussion started by: SIMMS7400
16 Replies
stcu(3) 						     Library Functions Manual							   stcu(3)

Name
       stcu,  st_cuinit,  st_setchdr,  st_currentpchdr,  st_free,  st_extadd, st_pext_iext, st_pext_rndx, st_iextmax, st_extstradd, st_str_extiss,
       st_idn_index_fext, st_idn_rndx, st_pdn_idn, st_rndx_idn, st_setidn - routines that provide a compilation unit symbol table interface

Syntax
       #include <syms.h>

       pCHDRR st_cuinit ()

       void st_setchdr (pchdr)
       pCHDRR	 pchdr;

       pCHDRR st_currentpchdr()

       void st_free()

       long st_extadd (iss, value, st, sc, index)
       long iss;
       long value;
       long st;
       long sc;
       long index;

       pEXTR st_pext_iext (iext)
       long iext;

       pEXTR st_pext_rndx (rndx)
       RNDXR rndx;

       long st_iextmax()

       long st_extstradd (str)
       char *str;

       char *st_str_extiss (iss)
       long iss;

       long st_idn_index_fext (index, fext)
       long index;
       long fext;

       long st_idn_rndx (rndx)
       RNDXR rndx;

       pRNDXR st_pdn_idn (idn)
       long idn;
       RNDXR st_rndx_idn (idn)
       long idn;

       void st_setidn (idndest, idnsrc)
       long idndest;
       long idnsrc;

Description
       The stcu routines provide an interface to objects that occur once per object, rather than once per file descriptor (for	example,  external
       symbols,  strings, and dense numbers).  The routines provide access to the current chdr (compile time hdr), which represents the symbol ta-
       ble in running processes with pointers to symbol table sections rather than indices and offsets used in the disk file representation.

       A new symbol table can be created with st_cuinit.  This routine creates and initializes a CHDRR (see cmplrs/stsupport.h).  The CHDRR is the
       current	chdr  and  is  used  in  all  later calls.  A chdr can also be created with the read routines (see The st_cuinit routine returns a
       pointer to the new CHDRR record.

       st_currentchdr Returns a pointer the current chdr.

       st_setchdr     Sets the current chdr to the pchdr argument and sets the per file structures to reflect a change in symbol tables.

       st_free	      Frees all constituent structures associated with the current chdr.

       st_extadd      Lets you add to the externals table. It returns the index to the new external for future reference and use.  The	ifd  field
		      for the external is filled in by the current file (see For more details on the parameters, see sym.h.

       st_pext_iext and st_pext_rndx
		      Returns  pointers  to  the  external, given a index referencing them. The latter routine requires a relative index where the
		      index field should be the index in external symbols and the rfd field should be the constant ST_EXTIFD. NOTE: The  externals
		      contain the same structure as symbols (see the SYMR and EXTR definitions).

       st_iextmax     Returns the current number of entries in the external symbol table.

       The iss field in external symbols (the index into string space) must point into external string space.

       st_extstradd   Adds a null-terminated string to the external string space and returns its index.

       st_str_extiss  Converts that index into a pointer to the external string.

       The  dense number table provides a convenience to the code optimizer, generator, and assembler. This table lets them reference symbols from
       different files and externals with unique densely packed numbers.

       st_idn_index_fext
		      Returns a new dense number table index, given an index into the symbol table of the current file (or if  fext  is  set,  the
		      externals table).

       st_idn_rndx    Returns  a  new dense number, but expects a RNDXR (see sym.h to specify both the file index and the symbol index rather than
		      implying the file index from the current file.  The RNDXR contains two fields: an index into the externals table and a  file
		      index rsyms can point into the symbol table, as well). The file index is ST_EXTIFD (see stsupport.h) for externals.

       st_rndx_idn    Returns a RNDX, given an index into the dense number table.

       st_pdn_idn     Returns a pointer to the RNDXR index by the idn argument.

See Also
       stfe(3), stfd(3)

								       RISC								   stcu(3)
All times are GMT -4. The time now is 09:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy