1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00:00
elinks/src/osdep
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
..
beos [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
dos [dos] doc.cpp -> dos.c 2023-11-25 18:23:18 +01:00
os2 [teminal] Added two output parameters to get_terminal_size. 2023-05-24 21:52:45 +02:00
riscos [mozjs24] Allow build elinks with g++ 2020-10-05 20:14:55 +02:00
unix [bsd] compilation fix 2022-07-24 21:46:34 +02:00
win32 [win32] Check if cmdline_options is not NULL 2024-04-07 19:57:59 +02:00
ascii.h Remove empty lines in start of header files 2005-11-15 11:33:27 +01:00
generic.h [dos] another compilation fix 2022-05-13 17:09:14 +02:00
getifaddrs.c [cflags] Removed -Wno-pointer-sign 2021-01-02 16:20:27 +01:00
getifaddrs.h [mozjs24] Allow build elinks with g++ 2020-10-05 20:14:55 +02:00
Makefile [dos] Very experimental DOS port based on links-2.26 code 2022-05-09 18:53:36 +02:00
meson.build [dos] Very experimental DOS port based on links-2.26 code 2022-05-09 18:53:36 +02:00
newwin.c [osdep] const in open_in_new 2022-02-17 19:37:50 +01:00
newwin.h [osdep] const in open_in_new 2022-02-17 19:37:50 +01:00
osdep.c [win32] Some changes in mouse handling 2024-01-04 18:29:31 +01:00
osdep.h [windows] Compilation fixes 2023-11-04 20:30:25 +01:00
signals.c [fg] track master proc for suspend via pids, not term fds, for fork_on_start 2024-04-10 15:14:23 -07:00
signals.h [signals] Removed code related to SIGALRM 2024-03-17 17:05:22 +01:00
stat.h Complete the list of S_I* macros. 2006-01-10 23:59:14 +01:00
stub.c [windows] Compilation fixes 2023-11-04 20:30:25 +01:00
stub.h [ win64 ] added openssl build support to docker, minor code changes 2022-04-25 20:52:03 +02:00
sysname.c [cflags] Removed -Wno-pointer-sign 2021-01-02 16:20:27 +01:00
sysname.h [cflags] Removed -Wno-pointer-sign 2021-01-02 16:20:27 +01:00
system.h [dos] Do not define CONFIG_OS_UNIX for DOS 2022-05-10 20:19:42 +02:00
types.h [types] get rid of longptr_T 2024-04-07 19:55:02 +02:00