$principal) or BAIL_OUT ("can't run $K5START: $!");
}
my $tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and -q was added implicitly');
$tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($status, 0, 'Backgrounding k5start with bad keytab works');
like ($err, qr/^k5start: error getting credentials: /, ' with error output');
is ($out, '', ' and -q was added implicitly');
+while (not -s "$TMP/pid" and $tries < 100) {
+ select (undef, undef, undef, 0.1);
+ $tries++;
+}
$pid = contents ("$TMP/pid");
ok (kill (0, $pid), ' and the PID file is correct');
kill (15, $pid) or warn "Can't kill $pid: $!\n";
like ($err, qr/^k5start: error getting credentials: /, ' with error output');
is ($out, '', ' and -q was added implicitly');
if ($status == 0) {
+ while (not -s "$TMP/pid" and $tries < 100) {
+ select (undef, undef, undef, 0.1);
+ $tries++;
+ }
$pid = contents ("$TMP/pid");
kill (15, $pid) or warn "Can't kill $pid: $!\n";
}
or BAIL_OUT ("can't run $K5START: $!");
}
$tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($status, 0, 'k5start -xb works');
is ($err, '', ' with no error output');
is ($out, '', ' and -q was added implicitly');
+$tries = 0;
+while (not -s "$TMP/pid" and $tries < 100) {
+ select (undef, undef, undef, 0.1);
+ $tries++;
+}
$pid = contents ("$TMP/pid");
ok (kill (0, $pid), 'k5start -xb started');
chmod 0555, $TMP or BAIL_OUT ("cannot chmod $TMP: $!");
is ($err, '', ' with no error output');
is ($out, '', ' and output was redirected properly');
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and output was redirected properly');
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($status, 0, 'Backgrounding k5start works');
like ($err, qr/^k5start: error getting credentials: /, ' with error output');
is ($out, '', ' and output was redirected properly');
+while (not -s "$TMP/pid" and $tries < 100) {
+ select (undef, undef, undef, 0.1);
+ $tries++;
+}
$pid = contents ("$TMP/pid");
ok (kill (0, $pid), 'k5start is running');
select (undef, undef, undef, 1);
ok (!-f "$TMP/child-out", ' and has no output');
copy ("$DATA/test.keytab", "$TMP/test.keytab");
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
# Clean up.
unlink "$TMP/krb5cc_child", "$TMP/child-out", "$TMP/test.keytab";
+unlink "$TMP/pid", "$TMP/child-pid";
rmdir $TMP;
or BAIL_OUT ("can't run $KRENEW: $!");
}
my $tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and -q was added implicitly');
$tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and -q was added implicitly');
$tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
or BAIL_OUT ("can't run $KRENEW: $!");
}
$tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and no regular output');
$tries = 0;
-while (not -f "$TMP/pid" and $tries < 100) {
+while (not -s "$TMP/pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and output was redirected properly');
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and output was redirected properly');
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and output was redirected properly');
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}
is ($err, '', ' with no error output');
is ($out, '', ' and output was redirected properly');
$tries = 0;
-while (not -f "$TMP/child-pid" and $tries < 100) {
+while (not -s "$TMP/child-pid" and $tries < 100) {
select (undef, undef, undef, 0.1);
$tries++;
}