On 21 May 2023 at 13:42, Tim wrote:
Subject: Re: Strange error running scripts. without
#!/usr/bin/bash
From: Tim <ignored_mailbox@yahoo.com.au>
To: mikes@guam.net, Community support for
Fedora users
<users@lists.fedoraproject.org>
Date sent: Sun, 21 May 2023 13:42:59 +0930
> On Sun, 2023-05-21 at 12:17 +1000, Michael D. Setzer II wrote:
> > Recently was getting a strange error when running a script that
> > didn't have #!/usr/bin/bash at top?
> >
> > free(): invalid next size (fast)
> > Aborted (core dumped)
> >
> > Just adding the line fixes the issue, but not sure why??
> > Have run the script before with no such error, but had been a while?
> > Script was just one line? Now 2 lines.
> >
> >
> > #!/usr/bin/bash
> > boincmgr -e /home/msetzerii/BOINC -d /home/msetzerii/BOINC
>
> A different default shell?
Not that I can see.
SHELL variable is a little different
SHELL=/bin/bash
ls -l | grep bin
lrwxrwxrwx. 1 root root 7 Aug 9 2022 bin -> usr/bin
lrwxrwxrwx. 1 root root 8 Aug 9 2022 sbin -> usr/sbin
$ ls -l /usr/ | grep bin
dr-xr-xr-x. 4 root root 163840 May 20 22:50 bin
dr-xr-xr-x. 2 root root 36864 May 19 23:22 sbin
And sh is
ls -l /usr/bin/sh
lrwxrwxrwx. 1 root root 4 Jan 2 21:47 /usr/bin/sh -> bash
Not sure why SHELL is /bin/bash instead of /usr/bin/bash
but both are the exact same file??
Even stranger, was going to see if using strace would
show something, but right now ran a copy of script
without line, and it runs fine without the error??
>
> --
>
> uname -rsvp
> Linux 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
>
> Boilerplate: All unexpected mail to my mailbox is automatically deleted.
> I will only get to see the messages that are posted to the mailing list.
>
>
+------------------------------------------------------------+
Michael D. Setzer II - Computer Science Instructor (Retired)
mailto:mikes@guam.net
mailto:msetzerii@gmail.com
Guam - Where America's Day Begins
G4L Disk Imaging Project maintainer
http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+