Okay, I have an vague idea about what happens, let me 1st add this to the bug report:
So I launched a half a dozen tmux windows and they had archivemedia script running and while I started all the windows, I went on to edit the script and add a few lines, and in these next 2 bugs you can see the [440], which I believe that at the time of the script execution, exceeded the line length of the script by about 10. /home/user/bin/archivemedia[440]: d-metadata: not found another tmux window at about the same time also gave this: /home/user/bin/archivemedia[421]: syntax error: `)' unexpected and this is ultra rare to see, the '/home/user/bin/script[num]' remains more-less the same This makes me think that the main problem is editing scripts while they have been executed by some process. Why does this happen? And before someone says, no, the script doesn't run another clone script like recursives execution or something like that. And why do I have a feeling that Theo De Raadt or someone will say "This is not a bug, this is a feature; It is meant to be like this!" On Sun, Aug 25, 2024 at 02:21:51PM +0000, Anon Loli wrote: > Hi list! > > I am puzzled about this as to why - this has kept on happening to me for many > months if not year(s). > It has also happened across many different scripts of mine. > > So upon exit of my scripts, sometimes, and I mean sometimes like 1 out of 20 > or > so runs of my scripts, it happens. > > How I ran these scripts: > I have a "ksh" line at the end of .cshrc and that basically starts my Ksh > shells on every terminal window. > And I ran these scripts by hand per-say, as they're located in ~/bin folder > which is, of course, added to PATH via > PATH=$HOME/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin > which can be found in ~/.profile file. > ALSO IT COULD BE POSSIBLE: I usually also run these scripts within tmux(1) > becaues the ST doesn't have a buffer scrollback even with the scrollback > applied, on OpenBSD, for some reason... it works perfectly well on FreeBSD > last > time I used it. > I also have "#!/bin/sh" in all of my scripts. > > I have of course modified some things like the exported PS1 in ~/.kshrc, but > other than that I don't see what can be the problem. > > It could be, which I doubt, the terminal problem, and the terminal used is ST > from [1]. > > Sadly I instinctively closed my terminal window with the exact error message > so > I can only give you as much of it as I remember. > I tried reproducing it right now but I can't, perhaps it's even rarer than > 1/20 > chance. > Remember that this happens on the EXIT of a script which was running perfectly > fine. > > The error message is something like this: > "/home/user/bin/script: quotation mark not closed", > or > "/home/user/bin/script: closing quotation mark missing", > and in the script that I have attached you can clearly see that all quotation > marks have been closed. > And no, not all scripts use find(1) or mpv(1), so I don't think they have a > specific utility in common... unless maybe echo? > > [1] http://st.suckless.org/ > #!/bin/sh > # 2024/08/25, I deny the existence of Intellectual Property including > licenses. > tmpfile=".playvideos.tmp" > echo > "$tmpfile" > find . -type f -name "*mp4" -o -name "*webm" -o -name "*mkv" -o -name "*avi" > -o -name "*m4v" -o -name "*mov" -o -name "*3gp" -o -name "*flv" -o -name > "*wmv" -o -name "*vob" >> "$tmpfile" > mpv --vo=gpu --loop --shuffle --playlist="$tmpfile" > rm "$tmpfile"