Check return value from readlink.
authorRichard Jones <rjones@trick.home.annexia.org>
Wed, 23 Sep 2009 11:09:26 +0000 (12:09 +0100)
committerRichard Jones <rjones@trick.home.annexia.org>
Wed, 23 Sep 2009 11:09:26 +0000 (12:09 +0100)
cat/run-cat-locally
df/run-df-locally
edit/run-edit-locally
inspector/run-inspector-locally
rescue/run-rescue-locally

index bba2c08..be60d07 100755 (executable)
@@ -34,7 +34,7 @@ my $path = $0;
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
-    my $link = readlink($path);
+    my $link = readlink($path) or die "readlink: $path: $!";
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
index 3557443..f8a50aa 100755 (executable)
@@ -34,7 +34,7 @@ my $path = $0;
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
-    my $link = readlink($path);
+    my $link = readlink($path) or die "readlink: $path: $!";
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
index 90968a2..3a6a9ab 100755 (executable)
@@ -34,7 +34,7 @@ my $path = $0;
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
-    my $link = readlink($path);
+    my $link = readlink($path) or die "readlink: $path: $!";
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
index 156f3ae..6106282 100755 (executable)
@@ -34,7 +34,7 @@ my $path = $0;
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
-    my $link = readlink($path);
+    my $link = readlink($path) or die "readlink: $path: $!";
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
index d814ed5..33191e7 100755 (executable)
@@ -35,7 +35,7 @@ my $path = $0;
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
 
 # Follow symlinks until we get to the real file
 while(-l $path) {
-    my $link = readlink($path);
+    my $link = readlink($path) or die "readlink: $path: $!";
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {
     if(File::Spec->file_name_is_absolute($link)) {
         $path = $link;
     } else {