10 |
|
|
11 |
|
#include <stdio.h> |
12 |
|
#include <sys/types.h> |
13 |
+ |
#include <sys/select.h> |
14 |
|
#include <signal.h> |
15 |
|
#include <fcntl.h> |
16 |
|
#include "netproc.h" |
17 |
+ |
#include "paths.h" |
18 |
|
#include "vfork.h" |
19 |
|
/* select call compatibility stuff */ |
20 |
|
#ifndef FD_SETSIZE |
39 |
|
static PROC *pindex[FD_SETSIZE]; /* process index table */ |
40 |
|
|
41 |
|
static char ourhost[64]; /* this host name */ |
42 |
< |
static char ourdir[128]; /* our working directory */ |
42 |
> |
static char ourdir[MAXPATH]; /* our working directory */ |
43 |
|
static char ouruser[32]; /* our user name */ |
44 |
|
static char *ourshell; /* our user's shell */ |
45 |
|
|
65 |
|
if (ps == NULL) |
66 |
|
return(NULL); |
67 |
|
if (!ourhost[0]) { /* initialize */ |
68 |
< |
char dirtmp[128]; |
68 |
> |
char dirtmp[MAXPATH]; |
69 |
|
register char *cp; |
70 |
|
register int len; |
71 |
|
|
72 |
|
strcpy(ourhost, myhostname()); |
73 |
< |
getcwd(dirtmp, sizeof(dirtmp)); |
73 |
> |
getwd(dirtmp); |
74 |
|
if ((cp = getenv("HOME")) != NULL) { |
75 |
|
if (!strcmp(cp, dirtmp)) |
76 |
|
ourdir[0] = '\0'; |
171 |
|
char *command; |
172 |
|
int (*compf)(); |
173 |
|
{ |
174 |
< |
char udirt[128]; |
174 |
> |
char udirt[MAXPATH]; |
175 |
|
char *av[16]; |
176 |
|
int pfd[2], pid; |
177 |
|
register int i; |