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

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

unix.superglobalmegacorp.com

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