sem: --fg --line-buffer failed.

This commit is contained in:
Ole Tange 2015-01-02 11:06:32 +01:00
parent 60a62086bb
commit 44d5283151
3 changed files with 8 additions and 3 deletions

View file

@ -5450,9 +5450,9 @@ sub set_non_blocking {
for my $fdno (1,2) {
my $fdr = $self->fh($fdno,'r');
my $flags;
fcntl($fdr, &F_GETFL, $flags) || die $!; # Get the current flags on the filehandle
$flags |= &O_NONBLOCK; # Add non-blocking to the flags
fcntl($fdr, &F_SETFL, $flags) || die $!; # Set the flags on the filehandle
fcntl($fdr, &::F_GETFL, $flags) || die $!; # Get the current flags on the filehandle
$flags |= &::O_NONBLOCK; # Add non-blocking to the flags
fcntl($fdr, &::F_SETFL, $flags) || die $!; # Set the flags on the filehandle
}
}

View file

@ -42,3 +42,6 @@ sem --wait
echo '### Test bug #33621: --bg -p should give an error message'
stdout parallel -p --bg echo x{}
echo '### Failed on 20141226'
sem --fg --line-buffer --id lock_id echo OK

View file

@ -96,3 +96,5 @@ done 4
40
### Test bug #33621: --bg -p should give an error message
parallel: Error: Jobs running in the background cannot be interactive.
### Failed on 20141226
OK