Waking up from hibernate stopped watch script [LITE]

Possibly. And I am not sure, either. It is not that often that I use a bash script in this way.
Between the two of us or any other contributors that join the thread, let’s research it more.
The initial question: What is stopping it from starting is, I think addressed. But, the result you want: A working function script, Is Not.
I am sure we’ll get it working. :wink:

Yeah, lets do it. I have a very bad luck in Stack Overflow, I’ll find another way.

I’ve been to another forum for this problem’s enlightment, but it seems I face the dead end. And possibly, the main cause of this problem, is the watch command. I was told to monitor the cause of the freezing using strace command, but this is not the final solution, because it only shows the process whilst the freezing happen randomly, last time it took 8 straight days resuming without freezing. Also, the final cure for this including modify the source code of watch, which happened to be a heavy task for me.

What I do now, is to change the watch command, I substitute it with while command like this:

while : 
do
bash script.sh
sleep 1
done 

I tried this code several times and it does not freeze, I just hope that this does not freeze one day. But since while : is infinite, I wonder if its running under hibernation because the resume seems very fluid.

edit: oh snap, it freeze after some more tries.

1 Like

Quenyen, would you be willing to share the actual scripts involved or send them privately for examination?
Without knowing what the scripts contain or do, it is very hard to diagnose, at all.

sure, here is the script I’ve been using, I sometimes just run it with regular bash command, and sometimes just leave it running with watch command, and you might see clear (line:97) command inside the script because recently I tried the while : command, and it has the purpose of disposing the old data shown on the terminal.

LINK
password: covid19
tools needed: xidel

1 Like

UPDATE:
the culprit is found via killing child PID. the problem lays on xidel command. There’s a assumption that xidel is dead when the TCP connection is disconnected upon suspend process, and after resuming, xidel fails to re-establish the connection, or so.

1 Like