Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve TTY handling #29

Closed
fachat opened this issue Dec 10, 2019 · 5 comments
Closed

Improve TTY handling #29

fachat opened this issue Dec 10, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@fachat
Copy link
Owner

fachat commented Dec 10, 2019

improve TTY handling based on MORE Fix (Issue #27 )

  • Tasks get a PROCESS GROUP (PGRP), inherited from parent
  • Fork can create new/use PGRP so tasks can be grouped into jobs by shell (creted PGRP Id is same as task ID of forked child, so returned task ID value can be reused)
  • STREAMS get an optional "line discipline"
    -- if set
    --- STREAM gets a PGRP attached
    ---- On GETC, if PGRP does not match block
    ---- On PUTC,
    ----- if Ctrl-C -> signal (all) PGRP tasks SIGTERM
    ----- if Ctrl-D -> EOF
@fachat fachat added the enhancement New feature or request label Dec 10, 2019
@fachat
Copy link
Owner Author

fachat commented Apr 4, 2020

New FORK param: to-be-used PGRP (or flag to create new one)

We cannot re-use Task ID of created child as PGRP ID when a new one is created - a previously started PGRP may still run, but this very PGRP member has already finished, and Task ID would be reused. Maybe second return param?

@fachat
Copy link
Owner Author

fachat commented Apr 15, 2020

This ticket should include making slipd the controlling terminal for users logged in via telnet

@fachat fachat added this to the 2.2 milestone May 2, 2020
@fachat
Copy link
Owner Author

fachat commented Sep 22, 2023

@fachat fachat self-assigned this Feb 20, 2024
@fachat
Copy link
Owner Author

fachat commented Feb 21, 2024

Streams can now have a foreground process attached that receives the signal sent to the stream. The console sends SIG_BRK on Ctrl-C, and the lib6502 signal handler terminates the process by default. This can be overwritten by setting a lib6502 signal handler. The lsh currently does that (and ignores it).

@fachat
Copy link
Owner Author

fachat commented Feb 21, 2024

Blocking when reading a stream by another task than the foreground task (if set) is not there (yet). Not sure when / if this will be needed, so deferred for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant