1
0
Fork 0
elinks/src/terminal
Scott Mcdermott b2556aa953 [fg] track master proc for suspend via pids, not term fds, for fork_on_start
When ui.sessions.fork_on_start, we fork a process that has a different
fdout than get_output_handle() (which has hardcoded fdout of 1), so it
will never be considered term->master, yet this is the process we want
to wake up in SIGTSTP handler.

Since we cannot rely on term->master to determine if we are the master
process, we instead move master_pid to be set explicitly at the places
where we have information about whether our process is a master or a
slave: first on start, then once the interlink determination has been
made.

master_pid has to be set in both parent and child, because both will get
suspended and need to know which one needs to resume in background with
SIGCONT (the master).  We can't inherit from the parent because it's
unknown at the time of fork.

Previously, master_pid worked correctly with fork_on_start=0,
-no-connect or -dump, but not with fork_on_start=1.

See #287 for background.
2024-04-10 15:14:23 -07:00
..
Makefile [terminal] terminal.cpp -> terminal.c 2023-11-25 18:08:46 +01:00
TODO Initial commit of the HEAD branch of the ELinks CVS repository, as of 2005-09-15 15:58:31 +02:00
color.c [color] Removed code related to draw_text_node 2022-10-16 15:18:34 +02:00
color.h [renderer] enum link_state -> link_state_T, enum color_flags -> color_flags_T 2022-01-28 16:11:54 +01:00
draw.c [terminal] Added terminfo for 24 bit color 2023-07-19 19:00:26 +02:00
draw.h [ecmascript] Commented out clientHeight and similar properties 2024-03-02 19:13:45 +01:00
event.c [teminal] Added two output parameters to get_terminal_size. 2023-05-24 21:52:45 +02:00
event.h [terminal] Add cell_height and cell_width to structs unconditionally. Refs #288 2024-03-07 08:22:57 +01:00
hardio.c [dos] Very experimental DOS port based on links-2.26 code 2022-05-09 18:53:36 +02:00
hardio.h [terminal] const in hard_write 2022-02-16 20:49:21 +01:00
itrm.h [terminal] itrm_queue data must be unsigned char * . Refs #87 2021-01-17 18:28:42 +01:00
kbd.c [kbd] Test commit. Change <= 0 to < 0 2024-01-03 21:37:07 +01:00
kbd.h [terminal] exec_on_terminal and related rewritten a bit to allow const param 2022-01-30 18:12:38 +01:00
key.inc Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
meson.build [terminal] terminal.cpp -> terminal.c 2023-11-25 18:08:46 +01:00
mouse.c [mouse] Decode ESC [ < . Refs #246 2023-07-18 17:13:58 +02:00
mouse.h [mouse] Decode ESC [ < . Refs #246 2023-07-18 17:13:58 +02:00
palette.inc Doxygen: Begin commands with @ not \. 2007-07-31 13:47:12 +03:00
screen.c [terminal] Do not draw the right bottom cell 2024-01-05 19:29:58 +01:00
screen.h [sixel] Small progress. 2023-05-19 21:31:51 +02:00
sixel.c [memcount] CONFIG_DEBUG inside memcount.h 2023-10-25 17:17:08 +02:00
sixel.h [lists] LIST_HEAD -> LIST_HEAD_EL to not clash with libevent's LIST_HEAD. Also added curl implementation of ftpes and sftp 2023-06-19 18:43:53 +02:00
tab.c [terminal] cast 2022-01-26 17:58:29 +01:00
tab.h [mozjs24] Allow build elinks with g++ 2020-10-05 20:14:55 +02:00
terminal.c [fg] track master proc for suspend via pids, not term fds, for fork_on_start 2024-04-10 15:14:23 -07:00
terminal.h [fg] Try to send CONT signal only from the master instance. Refs #287 2024-03-07 11:44:42 +01:00
terminfo.c [terminfo] strike 2023-08-25 20:23:01 +02:00
terminfo.h [terminal] Strikethrough for <STRIKE> element 2023-08-25 20:10:54 +02:00
window.c [debug] compilation fixes for -Dwithdebug=true 2023-10-23 15:56:53 +02:00
window.h [debug] compilation fixes for -Dwithdebug=true 2023-10-23 15:56:53 +02:00