2026/04/02

From Woozle Writes Code
Jump to navigation Jump to search
Thursday, April 2, 2026 (#92)
Wednesday Thursday Friday posts:prev <this> next

References

  • 09:00~ : local schema listing re-achieved, woot! Now to tidy up and then also try to get it working over ssh2 again...
  • 10:39 Time to refer back to the Process Control Model to figure out how ssh2 is supposed to operate.
  • 10:45 Items to keep in mind:
    • In an SSH2 session (unlike a Proc session), there are two non-Stream resources to keep track of: the ssh2_connect() resource and the ssh2_exec() resource.
    • The Starter object keeps the ssh2_connect() resource, but the Session object needs to pass that to ssh2_exec().
    • Q1: How does the Session object access the Starter object?
  • 12:55 A1: Maybe it should work like this:
    • The Starter doesn't do anything except create a Session.
    • The Session opens and closes the ssh2 session, and tracks both that (ssh2_connect()) resource and the ssh2_exec() resource.
      • Q2: Does the ssh2_exec() resource need to be closed as well? (If so, then maybe this ^ isn't a good model, because we'll be opening and closing two separate things.
        • A2: Tentatively, this does not appear to be the case. The documentation does not mention any need to close the resource, nor does there appear to be a function with which to do so.
  • 20:34 I think I need a new Process Control Model table, to show what each of the components (Starter, Session) are supposed to do.
Model Action Action: Proc Starter Action: Proc Session Action: SSH2 Starter Action: SSH2 Session
Open NO OP create Session object ssh2_connect()
Command proc_open() send to stdin NO OP ssh2_exec()
Shut NO OP zap Session object ssh2_​disconnect()
  • 21:55 Trying to document stuff has been almost impossible for the last hour or so, because of cloud5 being overloaded to the point where pages refuse to load many times in a row, requiring 10-20 minutes per edit.
  • 21:59 ...and then suddenly everything is fine...