Annotation of researchv10no/dk/cmd/pop.c, revision 1.1

1.1     ! root        1: #include <sgtty.h>
        !             2: 
        !             3: main()
        !             4: {
        !             5:        int fd, x;
        !             6: 
        !             7:        fd = open("/dev/dk/dk01", 2);
        !             8:        if(fd < 0){
        !             9:                perror("dk01");
        !            10:                exit(1);
        !            11:        }
        !            12:        printf("dk01 opened %d\n", fd);
        !            13:        while((x = ioctl(fd, FIOLOOKLD, 0)) != -1){
        !            14:                printf("popping %d\n", x);
        !            15:                if(ioctl(fd, FIOPOPLD, 0) < 0){
        !            16:                        perror("pop");
        !            17:                        exit(1);
        !            18:                }
        !            19:        }
        !            20:        printf("done\n");
        !            21:        exit(0);
        !            22: }

unix.superglobalmegacorp.com

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