diff --git a/doc/files/exec b/doc/files/exec deleted file mode 100644 index aaf7732144bbdfd920d58ded1231bac0683d7dc5..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..57b4b94caecd3fe2cfe4ede2b83c090738a3224b --- /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 f45674bcab34d5d54a34c48fde98bc7f61a20b34..3c19ae6404ff644cec14646972cd79cea2d429e5 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 293b3d510d4c60d22775d0d5bdcbe2802cca5da1..a6f8a829749444d2cdbb2f0d9bf6829888c56145 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 15c903eba452955a54ef3aaacfe71200bd4657b9..fcb99f4b9ab47993a6e74af777c87fbae55d8762 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 bd1db67a659b69afa07f1a72fe5efe35886ffda0..87c0123666c8fb19ad091013f5e23ca3e45d9f4a 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