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