Has anyone got a clean solution for running a background SIMH process that doesn't involve `screen` or `tmux`?
I would like to create an init script or systemd module that will kick off a simulator as a daemon process that can start up on host boot, and shut down on host shutdown. I've made some progress toward this goal on FreeBSD, but the startup script I've come up with [/usr/local/etc/rc.d/simh] does involve using `tmux` to wrap the process, and it's not exactly clean. If anyone is interested in reading the rc script, I've shared it here: https://archives.loomcom.com/share/simh-rc-script My 3B2 simulator init script then has the following block: ... SET ON ON SIGTERM SET TIMER SHUTDOWN ; CONTINUE ON STOP EXIT (The 'SET TIMER SHUTDOWN' command tells the simulator to initiate a software shutdown in the same way a real 3B2 shuts itself down after the soft power switch is toggled. Other architectures will have other needs...) It mostly works, but not always, and I haven't been able to do a deep dive to understand why. I guess my ideal way to do this all would be to have a daemonizable SIMH that can use a buffered telnet console that does not need any operator intervention to boot, run, and shut down cleanly. I have experimented with the telnet console, but it seems that it always requires an active telnet connection to run, and will kill the simulator when the telnet connection is severed (unless this is operator error on my part). So, if anyone has any ideas, I would love to hear them. Has anyone else worked on this? -Seth -- Seth Morabito Poulsbo, WA, USA [email protected] _______________________________________________ Simh mailing list [email protected] http://mailman.trailing-edge.com/mailman/listinfo/simh
