screen keeps dying

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Turgut Kalfaoglu

Regular Contributor
Hi folks. I recently put something like this in my /jfss/scripts/services-start :
/opt/sbin/screen -dmS hep-sync-ns bash -c '/opt/bin/hep-sync-ns.rexx; exec bash'

(I have a name server running on the router, and the hep-sync-ns is a script that sleeps for a while and then syncs with its source DNS server)

But I often find that that screen is "dead" like this:
# screen -r
There is a screen on:
4079.pts-0.ns2 (Dead ???)
Remove dead screens with 'screen -wipe'.
There is no screen to be resumed.

[email protected]:/tmp/mnt/2TBEXTERNAL/entware/etc/init.d# screen -wipe
There is a screen on:
4079.pts-0.ns2 (Removed)
1 socket wiped out.
No Sockets found in /opt/tmp/screens/S-turgut.

Why does it die? I have ample swap space defined and enabled even.. The script that is launched and runs in an infinite loop is very simple.
Many thanks, -t
Last edited:


Very Senior Member
I guess the natural question to ask is if it's screen itself that's dying, or your script? One thing's for sure; it's not obvious what that script is doing, esp. the exec bash. The answer might lie in having a better understanding of that script. It just doesn't look right. Normally I would place everything in a single script and call that w/ screen. That way you can verify the script works correctly and reliably *before* committing it to screen.

P.S. I assume you installed bash (which isn't a normal part of the Merlin firmware) from Entware into /opt/...? And it's on the path (since you don't specify a path to it in the script)?
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!