• Жильцов Дмитрий Андреевич's avatar
    HtServ: a server needs no window, give Terry's second console back
    · 82d0da04
    At boot HtServ took the right console and held it forever.  All it ever
    said there was "Serving /Www on port 80", and the console listened to
    nobody, so the keeper had one console where Terry gave him two, and a
    VNC click that drifted right sent his keystrokes into the void.
    
    HtServAuto now spawns HtServ as a child of Adam, like NtpDaemon, in a
    task with a doc but without DISPLAYf_SHOW.  It compiles Apps/HtServ.HC
    there, <exe> pages still see StreamPrint, sessions are still its
    children.  Two ExePrints, so TaskRep; titles it "HtServ;" and not with
    the first lines of the file.  HomeSys.HC no longer hands it user2, and
    htserv_term is gone.
    
    New: HtServStop;.  Kill closes no sockets, and a killed HtServ left
    port 80 taken until the next boot.  HtServ now leaves its listening
    socket in htserv_sock, and HtServStop; kills the task first, so nobody
    sits in accept(), then closes the socket.  Checked in QEMU: GET 200,
    HtServStop;, tcp_bound_sockets[80] back to 0, HtServ again, GET 200.
    82d0da04