<div dir="ltr"><div>The best way is probably to pass a power-fail interrupt to the emulated OS, and have it set up to deal with that. I'm now sure how many of the OS's available under simh emulation have such facilities.</div><div><br></div><div>An option would be to have a simh command, like</div><div>ONSHUTDOWN <silename></div><div>where a simh script is executed when a shutdown interrupt occurs on the host OS. This may nor be as useful, as the consol may not be in a state to handle command input at any moment (not logged out, or sitting at a shell prompt).</div><div><br></div><div>Most of the time, though, I don't get any warning anyway (someone trips over the power cord).</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 28, 2019 at 10:54 PM Supratim Sanyal <<a href="mailto:supratim@riseup.net">supratim@riseup.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF">
    <div>My SIMH VAX is behind a reliable
      IDS/IPS, so I wrote a stupid program to do a "RUN
      SYS$SYSTEM:OPCCRASH" when a TCP connection is made to a specific
      port. It's at QCOCAL::REMOTE-SHUTDOWN-LISTENER.ZIP if you are on
      HECnet. An obvious minimum improvement would be to support some
      sort of port-knocking.<br>
      <br>
      Best,<br>
      Supratim<br>
      <br>
      On 11/29/2019 12:38 AM, Lars Brinkhoff wrote:<br>
    </div>
    <blockquote type="cite">
      <pre>Seth J. Morabito wrote:
</pre>
      <blockquote type="cite">
        <pre>Has anyone got a clean solution for running a background SIMH process
that doesn't involve `screen` or `tmux`?
</pre>
      </blockquote>
      <pre>I have also been in search of a solution for this.  I'm OK with using
screen if necessary.

</pre>
      <blockquote type="cite">
        <pre>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.
</pre>
      </blockquote>
      <pre>It's the shutting down part that's the problem for me.  The operating
systems I'm interested need to have a user login and type a command to
shut down cleanly.  This is hard to do reliably.

Possible workarounds for this include abusing the hardware power fail
interrupt to initiate shutdown, or listening for a signal from the
network.

_______________________________________________
Simh mailing list
<a href="mailto:Simh@trailing-edge.com" target="_blank">Simh@trailing-edge.com</a>
<a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" target="_blank">http://mailman.trailing-edge.com/mailman/listinfo/simh</a></pre>
    </blockquote>
    <p><br>
    </p>
    <pre cols="72">-- 
Sent via Thunderbird/MX-Linux on an overheated Compaq Presario CQ61</pre>
  </div>

_______________________________________________<br>
Simh mailing list<br>
<a href="mailto:Simh@trailing-edge.com" target="_blank">Simh@trailing-edge.com</a><br>
<a href="http://mailman.trailing-edge.com/mailman/listinfo/simh" rel="noreferrer" target="_blank">http://mailman.trailing-edge.com/mailman/listinfo/simh</a></blockquote></div>