Changeset 347
- Timestamp:
- 12/10/06 12:57:35 (6 years ago)
- Files:
-
- 1 modified
-
applications/shepherd (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
applications/shepherd
r345 r347 490 490 if ($result) 491 491 { 492 &log( "\n" .ucfirst($progtype) . " $proggy did not exit cleanly!\n" .492 &log(ucfirst($progtype) . " $proggy did not exit cleanly!\n" . 493 493 "It may require configuration.\n"); 494 494 … … 873 873 874 874 if (!(open(PROG,"$prog|"))) { 875 &log("warning: couldn't exec \"$prog\": $!\n");875 &log("warning: couldn't exec $component as \"$prog\": $!\n"); 876 876 return -1; 877 877 } 878 879 &log("\n>>>> Output from $component >>>>>\n"); 878 880 879 881 eval { … … 891 893 close(PROG); 892 894 }; 895 896 &log("<<<<< End output from $component <<<<<\n\n"); 897 893 898 if ($@) { 894 899 die unless $@ eq "alarm\n"; # propagate unexpected errors 895 900 896 901 # timeout 897 &log( "progran for $timeout seconds, stopping it.\n");902 &log(ucfirst($component) . " ran for $timeout seconds, stopping it.\n"); 898 903 close(PROG); 899 904 } 900 905 901 906 if ($? == -1) { 902 &log("Failed to execute prog: $!\n");907 &log("Failed to execute $component: $!\n"); 903 908 return -1; 904 909 } elsif ($? & 127) { 905 &log((sprintf " progdied with signal %d, %s coredump\n",906 ($? & 127), (($? & 128) ? "with" : "without")));910 &log((sprintf "%s died with signal %d, %s coredump\n", 911 ucfirst($component), ($? & 127), (($? & 128) ? "with" : "without"))); 907 912 return $?; 908 } els e{909 &log((sprintf " prog exited with value %d\n", ($? >> 8)));910 return ($? >> 8); 911 }913 } elsif ($debug) { 914 &log((sprintf "%s exited with value %d\n", ucfirst($component), ($? >> 8))); 915 } 916 return ($? >> 8); 912 917 } 913 918
