Warning fixes.
This commit is contained in:
parent
ce249649b2
commit
13e195d19f
|
@ -10,6 +10,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
extern char** environ;
|
||||||
|
|
||||||
extern int _fork(void);
|
extern int _fork(void);
|
||||||
extern int _wait(int *);
|
extern int _wait(int *);
|
||||||
extern void _exit(int);
|
extern void _exit(int);
|
||||||
|
@ -18,7 +20,6 @@ extern void _close(int);
|
||||||
|
|
||||||
#define FAIL 127
|
#define FAIL 127
|
||||||
|
|
||||||
extern const char **environ;
|
|
||||||
static const char *exec_tab[] = {
|
static const char *exec_tab[] = {
|
||||||
"sh", /* argv[0] */
|
"sh", /* argv[0] */
|
||||||
"-c", /* argument to the shell */
|
"-c", /* argument to the shell */
|
||||||
|
@ -39,7 +40,7 @@ system(const char *str)
|
||||||
_close(i);
|
_close(i);
|
||||||
if (!str) str = "cd ."; /* just testing for a shell */
|
if (!str) str = "cd ."; /* just testing for a shell */
|
||||||
exec_tab[2] = str; /* fill in command */
|
exec_tab[2] = str; /* fill in command */
|
||||||
_execve("/bin/sh", exec_tab, environ);
|
_execve("/bin/sh", exec_tab, (char const**) environ);
|
||||||
/* get here if execve fails ... */
|
/* get here if execve fails ... */
|
||||||
_exit(FAIL); /* see manual page */
|
_exit(FAIL); /* see manual page */
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
*/
|
*/
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
char*
|
char*
|
||||||
|
|
|
@ -89,6 +89,7 @@ typedef int sig_atomic_t;
|
||||||
typedef void (*sighandler_t)(int);
|
typedef void (*sighandler_t)(int);
|
||||||
extern sighandler_t signal(int signum, sighandler_t handler);
|
extern sighandler_t signal(int signum, sighandler_t handler);
|
||||||
extern int raise(int signum);
|
extern int raise(int signum);
|
||||||
|
extern int kill(pid_t pid, int sig);
|
||||||
|
|
||||||
/* Select */
|
/* Select */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue