[gtk-doc] scanobj/gobj: Execute system() calls in subshells, Fixes #607531
- From: Stefan Kost <stefkost src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk-doc] scanobj/gobj: Execute system() calls in subshells, Fixes #607531
- Date: Fri, 22 Jan 2010 14:09:01 +0000 (UTC)
commit b37791867f938d9ab5ce5d3db63d7115981deb7a
Author: Loïc Minier <lool dooz org>
Date: Fri Jan 22 16:06:41 2010 +0200
scanobj/gobj: Execute system() calls in subshells, Fixes #607531
the tools already execute one command in a subshell so that if it fails,
we can still see the errors. It doesn't for other commands though (like the
compiler or the linker).
gtkdoc-scangobj.in | 7 +++----
gtkdoc-scanobj.in | 7 +++----
2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in
index fe25252..f3b4b45 100644
--- a/gtkdoc-scangobj.in
+++ b/gtkdoc-scangobj.in
@@ -1598,15 +1598,14 @@ if ($CC =~ /libtool/) {
print "gtk-doc: Compiling scanner\n";
$command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c";
-system($command) == 0 or die "Compilation of scanner failed: $!\n";
+system("($command)") == 0 or die "Compilation of scanner failed: $!\n";
print "gtk-doc: Linking scanner\n";
$command = "$LD -o $MODULE-scan $o_file $LDFLAGS";
-system($command) == 0 or die "Linking of scanner failed: $!\n";
+system("($command)") == 0 or die "Linking of scanner failed: $!\n";
print "gtk-doc: Running scanner $MODULE-scan\n";
-# use sh -c to avoid terminating the whole run without seeing the error
-system("sh -c \"$RUN ./$MODULE-scan\"") == 0 or die "Scan failed: $!\n";
+system("(./$MODULE-scan)") == 0 or die "Scan failed: $!\n";
if (!defined($ENV{"GTK_DOC_KEEP_INTERMEDIATE"})) {
unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan";
diff --git a/gtkdoc-scanobj.in b/gtkdoc-scanobj.in
index a7053c2..920423c 100755
--- a/gtkdoc-scanobj.in
+++ b/gtkdoc-scanobj.in
@@ -838,15 +838,14 @@ if ($CC =~ /libtool/) {
print "gtk-doc: Compiling scanner\n";
$command = "$CC $CFLAGS -c -o $o_file $MODULE-scan.c";
-system($command) == 0 or die "Compilation of scanner failed: $!\n";
+system("($command)") == 0 or die "Compilation of scanner failed: $!\n";
print "gtk-doc: Linking scanner\n";
$command = "$LD -o $MODULE-scan $o_file $LDFLAGS";
-system($command) == 0 or die "Linking of scanner failed: $!\n";
+system("($command)") == 0 or die "Linking of scanner failed: $!\n";
print "gtk-doc: Running scanner $MODULE-scan\n";
-# use sh -c to avoid terminating the whole run without seeing the error
-system("sh -c \"$RUN ./$MODULE-scan\"") == 0 or die "Scan failed: $!\n";
+system("(./$MODULE-scan)") == 0 or die "Scan failed: $!\n";
if (!defined($ENV{"GTK_DOC_KEEP_INTERMEDIATE"})) {
unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]