Annotation of cci/usr/src/usr.bin/bsc/cmd/3270/empaudnm.c, revision 1.1

1.1     ! root        1: 
        !             2: /*     D.L.Buck and Associates, Inc. - February, 1983
        !             3:  *
        !             4:  *     COPYRIGHT NOTICE:
        !             5:  *             Copyright c 1983 - An unpublished work by 
        !             6:  *             D.L.Buck and Associates, Inc.
        !             7:  *
        !             8:  *     PROPRIETARY RIGHTS NOTICE:
        !             9:  *             All rights reserved. This document and program contains
        !            10:  *             proprietary information of D.L.Buck and Associates,Inc.
        !            11:  *             of San Jose, California, U.S.A., embodying confidential
        !            12:  *             information,  ideas, and expressions,  no part of which
        !            13:  *             may be reproduced, or transmitted in any form or by any
        !            14:  *             means,  electronic,  mechanical,  or otherwise, without
        !            15:  *             the written permission of D.L.Buck and Associates, Inc.
        !            16:  * NAME
        !            17:  *     em_audnm -- name the audit file
        !            18:  *
        !            19:  * DESCRIPTION
        !            20:  *     If the primary audit file (/usr/spool/bscbatch/<hostname>/AUDIT) is
        !            21:  *     in use, this routine creates a secondary audit file to make entries
        !            22:  *     in. bsclog sorts and merges all files which begin with AUDIT before
        !            23:  *     it displays the log, fear not.
        !            24:  */
        !            25: #include "empr.h"
        !            26: #define spoolpath "/usr/spool/bscbatch/"
        !            27: 
        !            28: static char sccsid[] = "@(#)em_audnm.c 1.1 ";  /* sccs id */
        !            29: 
        !            30: extern char hostname[];
        !            31: extern char audname[];         /* temp audit file name goes here */
        !            32: extern char new_audnm[];       /* real audit file name goes here */
        !            33: 
        !            34: extern FILE *aud;
        !            35: em_audnm()
        !            36: {
        !            37:        int pid;                /* process number to give unique name to this
        !            38:                                   audit file by */
        !            39:        pid = getpid();
        !            40: 
        !            41:        sprintf(audname,"%s%s/TUDIT.%d",spoolpath,hostname,pid);
        !            42:        sprintf(new_audnm,"%s%s/AUDIT.%d",spoolpath,hostname,pid);
        !            43:        aud = fopen(audname,"a");
        !            44: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.