Annotation of coherent/d/bin/tty.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * Print out the tty name of the
        !             3:  * current user.
        !             4:  */
        !             5: 
        !             6: #include <stdio.h>
        !             7: char   *ttyname();
        !             8: 
        !             9: main(argc, argv)
        !            10: char *argv[];
        !            11: {
        !            12:        char *tty;
        !            13: 
        !            14:        if ((tty = ttyname(fileno(stderr))) != NULL)
        !            15:                printf("%s\n", tty); else
        !            16:                printf("Not a tty\n");
        !            17:        exit(0);
        !            18: }

unix.superglobalmegacorp.com

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