Jan Schaumann <[email protected]> wrote:
 
> That would require rm(1) to fork-exec a new shell for each subdir to
> allow the shell to newly expand the given args.

I'll be damned!

V6 sources from
http://minnie.tuhs.org/Archive/PDP-11/Distributions/research/Dennis_v6/

s2/rm.c:

if(rflg) {
        i = fork();
        if(i == -1) {
                printf("%s: try again\n", arg);
                return;
        }
        if(i) {
                while(wait() != i);
                return;
        }
        if(chdir(arg)) {
                printf("%s: cannot chdir\n", arg);
                exit();
        }
        p = 0;
        execl("/etc/glob", "glob", "rm", "-r",
                        fflg? "-f": "*", fflg? "*": p, 0);
        printf("%s: no glob\n", arg);
        exit();
}

Alright, now I buy it. :-)

-Jan

Attachment: pgpsjVL6ytzs4.pgp
Description: PGP signature

_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to