From dd66d479d634a7b4b5fc455cdff6c72074e48082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 31 Oct 1995 18:59:05 +0100 Subject: [PATCH] minor fixes Rev: doc/files/exec:1.2(DEAD) Rev: doc/files/exece:1.1.1.1 Rev: src/ChangeLog:1.3 Rev: src/Makefile.in:1.2 Rev: src/config.h:1.2 Rev: src/lpc_signal.c:1.2 --- doc/files/exec | 22 ---------------------- doc/files/exece | 27 +++++++++++++++++++++++++++ src/ChangeLog | 5 +++++ src/Makefile.in | 3 ++- src/config.h | 7 ------- src/lpc_signal.c | 2 +- 6 files changed, 35 insertions(+), 31 deletions(-) delete mode 100644 doc/files/exec create mode 100644 doc/files/exece diff --git a/doc/files/exec b/doc/files/exec deleted file mode 100644 index aaf7732144..0000000000 --- a/doc/files/exec +++ /dev/null @@ -1,22 +0,0 @@ -NAME - exec - execute a program - -SYNTAX - int exec(string ... args); - -DESCRIPTION - This function transforms the uLPC process into a process running - the program specified in args. The args will be sent as argv[] to - the new program. This function only returns if something went wrong - during exec(), and in that case it returns zero. - -NOTA BENE - The uLPC driver _dies_ when this function is called. You must use - fork() if you wish to execute a program and still run the uLPC - driver. - -EXAMPLE - exec("ls","-l"); - -SEE ALSO - files/fork, file->pipe diff --git a/doc/files/exece b/doc/files/exece new file mode 100644 index 0000000000..57b4b94cae --- /dev/null +++ b/doc/files/exece @@ -0,0 +1,27 @@ +NAME + exece - execute a program + +SYNTAX + int exece(string file, string *args); + or + int exece(string file, string *args, mapping(string:string) env); + +DESCRIPTION + This function transforms the uLPC process into a process running + the program specified in the argument 'file' with the argument 'args'. + If the mapping 'env' is present, it will completely replace all + environment variables before the new program is executed. + This function only returns if something went wrong during exece(), + and in that case it returns zero. + +NOTA BENE + The uLPC driver _dies_ when this function is called. You must use + fork() if you wish to execute a program and still run the uLPC + driver. + +EXAMPLES + exece("/bin/ls", ({"-l"})); + exece("/bin/sh", ({"-c", "echo $HOME"}), (["HOME":"/not/home"])); + +SEE ALSO + files/fork, file->pipe diff --git a/src/ChangeLog b/src/ChangeLog index f45674bcab..3c19ae6404 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 31 18:57:49 1995 Fredrik Hubinette <hubbe@sparky.signum.se> + + * Makefile.in, config.h: moved DEBUG to Makefile + * lpc_signals.c: fixed a warning + Sun Oct 29 04:02:03 1995 Fredrik Hubinette <hubbe@sparky.signum.se> * v1.0E-13 released diff --git a/src/Makefile.in b/src/Makefile.in index 293b3d510d..a6f8a82974 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -41,7 +41,8 @@ WARN=@WARN@ #WARN= -Wall -Wshadow -Dlint #add extra defines here -DEFINES=-DDEFAULT_MASTER=\"$(lib_prefix)/master.lpc\" +# Be sure to use -g and -DDEBUG when looking for bugs +DEFINES=-DDEBUG -DDEFAULT_MASTER=\"$(lib_prefix)/master.lpc\" # -O should work with all compilers OPTIMIZE=@OPTIMIZE@ diff --git a/src/config.h b/src/config.h index 15c903eba4..fcb99f4b9a 100644 --- a/src/config.h +++ b/src/config.h @@ -6,13 +6,6 @@ #ifndef CONFIG_H #define CONFIG_H -/* - * Define DEBUG and be sure to compile with -g if you want to debug uLPC - * with DEBUG defined debugging becomes much easier. - */ - -#define DEBUG - /* * Define the evaluator stack size, used for just about everything. */ diff --git a/src/lpc_signal.c b/src/lpc_signal.c index bd1db67a65..87c0123666 100644 --- a/src/lpc_signal.c +++ b/src/lpc_signal.c @@ -160,8 +160,8 @@ static RETSIGTYPE receive_signal(int signum) void check_signals() { - extern int d_flag; #ifdef DEBUG + extern int d_flag; if(d_flag>5) do_debug(0); #endif -- GitLab