What's new

screen keeps dying

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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.

turgut@ns2:/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:
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

Sign Up For SNBForums Daily Digest

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