--- gtkdoc-scanobj.in.old	2008-11-17 06:03:43.000000000 +0100
+++ gtkdoc-scanobj.in	2008-11-17 06:11:59.000000000 +0100
@@ -838,15 +838,14 @@
 
 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";
 
 unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan";
 
--- gtkdoc-scangobj.in.old	2008-11-17 06:03:40.000000000 +0100
+++ gtkdoc-scangobj.in	2008-11-17 06:11:46.000000000 +0100
@@ -1598,15 +1598,14 @@
 
 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";
 
 unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan";
 
