Revision 8098,
481 bytes
checked in by cfields, 29 years ago
(diff) |
update for getting tty
fix error message
|
Line | |
---|
1 | #include <stdio.h> |
---|
2 | #include "nannylib.h" |
---|
3 | |
---|
4 | void putstrings(char **strs) |
---|
5 | { |
---|
6 | while (*strs) |
---|
7 | printf(" %s\n", *strs++); |
---|
8 | } |
---|
9 | |
---|
10 | int main(int argc, char **argv, char **env) |
---|
11 | { |
---|
12 | int ret; |
---|
13 | char **args, **newenv, *tty; |
---|
14 | |
---|
15 | ret = nanny_loginUser(&newenv, &args, &tty); |
---|
16 | if (ret) |
---|
17 | { |
---|
18 | fprintf(stderr, "loginUser failed.\n"); |
---|
19 | exit(1); |
---|
20 | } |
---|
21 | |
---|
22 | printf("Environment:\n"); |
---|
23 | putstrings(newenv); |
---|
24 | printf("\nArgs:\n"); |
---|
25 | putstrings(args); |
---|
26 | printf("\ntty: %s\n", tty); |
---|
27 | |
---|
28 | exit(0); |
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.