--- ./execute_cmd.c.orig 2004-05-11 12:29:15.000000000 +0200
|
|
+++ ./execute_cmd.c 2004-05-11 12:43:59.000000000 +0200
|
|
@@ -3472,6 +3472,23 @@
|
|
int sample_len;
|
|
|
|
SETOSTYPE (0); /* Some systems use for USG/POSIX semantics */
|
|
+ if ( getenv ("BASH_EXEC_DEBUG_FILE") )
|
|
+ {
|
|
+ char *file = getenv ("BASH_EXEC_DEBUG_FILE");
|
|
+ int fd = open (file, O_WRONLY|O_CREAT|O_APPEND, 0666);
|
|
+ if ( fd >= 0 )
|
|
+ {
|
|
+ int i;
|
|
+ write (fd, command, strlen(command));
|
|
+ for (i=0; args[i]; i++)
|
|
+ {
|
|
+ write (fd, " ", 1);
|
|
+ write (fd, args[i], strlen(args[i]));
|
|
+ }
|
|
+ write (fd, "\n", 1);
|
|
+ close (fd);
|
|
+ }
|
|
+ }
|
|
execve (command, args, env);
|
|
i = errno; /* error from execve() */
|
|
SETOSTYPE (1);
|