Version 0.2.0
* First Debian unstable release
* Complete re-structured all the code to be able to add support for
different architectures (but only i386 arch is supported in this
version)
* Log also return values
* Log arguments (and return values) for syscalls
* Added preliminary support for various simultaneous processes
* getopt-like options
* New option: -a (alignment column)
* New option: -L (don't display library calls)
* New option: -s (maximum # of chars in strings)
* Now it reads config files with function names and parameter types
* Programs using clone() should work ok now
* debian/rules: gzipped only big files in /usr/doc/ltrace
* Debian: New Standards-Version: 2.4.0.0
* beginning to work on sparc port (not yet done)
diff --git a/execute_program.c b/execute_program.c
new file mode 100644
index 0000000..02d6471
--- /dev/null
+++ b/execute_program.c
@@ -0,0 +1,37 @@
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+
+#include "ltrace.h"
+#include "options.h"
+#include "output.h"
+#include "sysdep.h"
+
+void execute_program(struct process * sp, char **argv)
+{
+ int pid;
+
+ if (opt_d) {
+ output_line(0, "Executing `%s'...", sp->filename);
+ }
+
+ pid = fork();
+ if (pid<0) {
+ perror("fork");
+ exit(1);
+ } else if (!pid) { /* child */
+ trace_me();
+ execvp(sp->filename, argv);
+ fprintf(stderr, "Can't execute `%s': %s\n", sp->filename, strerror(errno));
+ exit(1);
+ }
+
+ if (opt_d) {
+ output_line(0, "PID=%d", pid);
+ }
+
+ sp->pid = pid;
+
+ return;
+}