uuencode: fstat-ing a.txt: Bad file descriptor

Issues related to applications and software problems
Post Reply
alxdrl
Posts: 2
Joined: 2020/01/14 17:21:49

uuencode: fstat-ing a.txt: Bad file descriptor

Post by alxdrl » 2020/01/14 17:56:56

Hi,

Just came across the following problem running uuencode command with stdin closed (CentOS 7.4 / 3.10.0-693.11.6.el7.x86_64) :
uuencode --version
uuencode (GNU sharutils) 4.13.3
> a.txt ; uuencode a.txt a.txt <&- ; echo $?
uuencode: fstat-ing a.txt: Bad file descriptor
1
This did not fail in older versions of CentOS :
uuencode --version
uuencode - GNU sharutils 4.2.1
> a.txt ; uuencode a.txt a.txt <&- ; echo $?
begin 666 a.txt
`
end
0
Yet under CentOS 7.4 strace-ing the command removes the problem, ie :

Code: Select all

#!/bin/bash
> a.txt
exec <&-
uuencode a.txt a.txt
echo $?
yields
uuencode: fstat-ing a.txt: Bad file descriptor
1
whereas

Code: Select all

#!/bin/bash
> a.txt
exec <&-
strace uuencode a.txt a.txt
echo $?
yields
begin 644 a.txt
`
end
0
Any hint about this discrepancies and what might cause this error (beside uuencode version) ?

Cheers,

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: uuencode: fstat-ing a.txt: Bad file descriptor

Post by TrevorH » 2020/01/14 20:15:07

You are more than 3 years out of date. Run yum update to get current on the only supported version which is 7.7.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

alxdrl
Posts: 2
Joined: 2020/01/14 17:21:49

Re: uuencode: fstat-ing a.txt: Bad file descriptor

Post by alxdrl » 2020/01/14 22:24:58

Hi,

I’m OK with the advice, but I’m not looking for a fix.

I’m looking for input here as to the diagnosis of this error :-)

Thanks.

Post Reply