source: trunk/athena/bin/newpag/newpag.c @ 8537

Revision 8537, 335 bytes checked in by ghudson, 28 years ago (diff)
Modernize, and enforce consistency.
Line 
1#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4
5return main(argc, argv)
6        int argc;
7        char **argv;
8{
9        char *shell = getenv("SHELL");
10        int code = setpag();
11
12        if (code != 0) {
13                perror("setpag");
14                exit(1);
15        }
16        if (argc == 1)
17                execl(shell != NULL ? shell : "/bin/sh", "sh", 0);
18        else
19                execvp(argv[1], argv + 1);
20        exit(1);
21}
Note: See TracBrowser for help on using the repository browser.