|
Bugzilla – Full Text Bug Listing |
| Summary: | Perl "bad file descriptor" error when using YaST commandline | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Distribution | Reporter: | Hans Heinrich Fiddelke <hh_fiddelke> |
| Component: | YaST2 | Assignee: | Michael Schröder <mls> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | fvogt, mls, mvidner, ncutler, yast-internal |
| Version: | Leap 15.3 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| URL: | https://trello.com/c/MtlIIzjR | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Hans Heinrich Fiddelke
2023-01-18 10:47:42 UTC
Thank you for your bug report. I can reproduce the problem. After some initial confusion, we found some very old YaST modules that actually use Perl. AFAICS all of them are candidates for dropping for for a major refactoring. Dropping is much more likely. perl-TermReadLine-Gnu... See also https://bugzilla.suse.com/show_bug.cgi?id=1203080 I just checked: yast2-users is also written in Perl, and that one is definitely not a drop candidate. It was refactored not so long ago, and it shows the same problem.
Reproducing it doesn't even need valid command line arguments:
% yast2 users foo
Unknown Command: foo
Use 'yast2 users help' for a complete list of available commands.
Warning: unable to close filehandle properly: Bad file descriptor, <STDIN> line
5 during global destruction (#1)
(S io) There were errors during the implicit close() done on a filehandle
when its reference count reached zero while it was still open, e.g.:
{
open my $fh, '>', $file or die "open: '$file': $!\n";
print $fh $data or die "print: $!";
} # implicit close here
Because various errors may only be detected by close() (e.g. buffering could
allow the print in this example to return true even when the disk is full),
it is dangerous to ignore its result. So when it happens implicitly, perl
will signal errors by warning.
Prior to version 5.22.0, perl ignored such errors, so the common idiom shown
above was liable to cause silent data loss.
CC'ing our Perl maintainer. Michael, please see the bug reporter's suggestion in comment #0. Took my solution from here: https://lists.opensuse.org/archives/list/bugs@lists.opensuse.org/message/SWKYI74DRVPBOKIBMPJZICQACK5RKTKX/ resp.: https://bugzilla.suse.com/show_bug.cgi?id=966042 The fix has reached Leap 15.3 as well: https://build.opensuse.org/package/show/openSUSE:Leap:15.3:Update/perl-Term-ReadLine-Gnu |