Annotation of researchv10no/cmd/spitbol/cint/doexec.c, revision 1.1

1.1     ! root        1: 
        !             2: /*
        !             3:        doexec does an "execle" function call to invoke the shell
        !             4:        on the command string in the passed scblk.
        !             5: */
        !             6: 
        !             7: #include "spitblks.h"
        !             8: 
        !             9: doexec( scbptr )
        !            10: 
        !            11: struct scblk   *scbptr;
        !            12: 
        !            13: {
        !            14:        int     l,savchr;
        !            15:        char    *cp;
        !            16:        extern  char    **environ;
        !            17: 
        !            18:        l       = scbptr -> len;
        !            19:        cp      = scbptr->str;
        !            20: 
        !            21:        savchr  = cp[l];
        !            22:        cp[l]   = 0;
        !            23:        execle( "/bin/sh","sh","-c",cp,0,environ );
        !            24:        cp[l]   = savchr;
        !            25: }
        !            26: 

unix.superglobalmegacorp.com

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