1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-01-03 14:57:44 -05:00
Commit Graph

6455 Commits

Author SHA1 Message Date
Witold Filipczyk
32e831a100 [NEWS] 0.17.1.1 Missing patch for musl 2024-10-05 08:29:15 +02:00
Witold Filipczyk
abb98ba1f4 Revert "[curl] include sys/cdefs.h for __STRING" . Refs #306
This reverts commit 3923ae6d64.

(cherry picked from commit ee43345e4a)
2024-10-05 08:26:55 +02:00
Witold Filipczyk
79776b739d [meson] 0.17.1 2024-10-05 08:14:07 +02:00
Witold Filipczyk
17dbfaba8b [NEWS] Info about 0.17.1 2024-10-05 08:12:49 +02:00
Witold Filipczyk
0d10fd3857 [interlink] trigger was unitialized
(cherry picked from commit 10555292b4)
2024-10-04 16:23:30 +02:00
Scott Mcdermott
50841ff75f [interlink] speed up first elinks, and use pipe trigger for fork_on_start
When the first elinks session starts (whether fork_on_start or not), it
tries to connect on AF_UNIX socket, to see if an existing master is
present.  The current code implements a retry loop with linear-increase
retry backoff, 50ms *= attempts, with 3 attempts, total delay 300ms,
before concluding master is not present.

After forking for fork_on_start, we do have to wait for the new master
to finish setup, so we can connect to it.  This is the case where retry
loop might be useful.  However in fork_on_start=0 case, there should be
no reason to ever wait: if we get ECONNREFUSED or ENOENT, the master
simply is not there, we can go on about our business as the master.

With fork_on_start=1 however, we will race with the child (that will
become the new master), which has to complete its socket/bind/listen
sequence.  Therefore we typically have to wait another 50ms (first
attempt delay), for a total of 350ms delay.

In both cases, there does not seem to be a purpose to the initial
connection attempt retry.  Conclusion after connect() failure should be
authoritative: there is no master.  We do not race with anyone.

If we have done fork_on_start and have to wait, we can instead open a
pipe before forking, and wait for the "new" master (its child) to send
us a byte over the pipe.  Thus, we do not need to poll, but can simply
block until we get the trigger, to indicate that AF_UNIX socket setup
has completed.

This speeds up the first start of elinks by 300ms for fork_on_start=0,
and between 300-350ms for fork_on_start=1 (or possibly more, if the
machine is loaded and child did not finish AF_UNIX setup in first 50ms).

(cherry picked from commit 3d1f020a3b)
2024-10-04 16:23:09 +02:00
Scott Mcdermott
c4af513360 [interlink] do not nest retries for connect_to_af_unix(), it has already
Not sure why a retry loop using MAX_BIND_TRIES / BIND_TRIES_DELAY
surrounds connect_to_af_unix(), since bind() is done elsewhere in the
code, and connect_to_af_unix() already has its own retry loop inside the
function, with its own set of defines for retries, i.e. MAX_CONNECT_TRIES
/ CONNECT_TRIES_DELAY, surrounding the connect().  No need to have two
levels of retry; if it's not successful within connect_to_af_unix() it
will never be.

(cherry picked from commit b482b9e069)
2024-10-04 16:22:41 +02:00
Witold Filipczyk
ca434fcd7a [getpid] Removed check for HAVE_GETPID
It is assumed that every supported system has getpid().

(cherry picked from commit 7545b8093d)
2024-10-04 16:22:12 +02:00
Witold Filipczyk
9eaf7d3096 [style] shorter
(cherry picked from commit 1489e4002a)
2024-10-04 16:21:52 +02:00
Scott Mcdermott
dac2535659 [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.

(cherry picked from commit b2556aa953)
2024-10-04 14:07:06 +02:00
Witold Filipczyk
0b704887db [fg] master_pid is 0 for slave terminals, so no need to comapare with pid
(cherry picked from commit 432771ac82)
2024-10-04 14:05:44 +02:00
Witold Filipczyk
66e17a6a07 [fg] Try to send CONT signal only from the master instance. Refs #287
(cherry picked from commit b102addf9f)
2024-10-04 14:04:50 +02:00
Witold Filipczyk
da83dedb22 [meson] Check for header event.h of libev. Refs #287
(cherry picked from commit b71faa2d07)
2024-10-04 14:03:44 +02:00
Witold Filipczyk
40c7f69167 [libevent] include event2/event.h instead of event.h
(cherry picked from commit 1f4ca1445d)
2024-10-04 14:03:32 +02:00
Witold Filipczyk
d885a41b91 [fg] Resize terminal after CTRL-Z and fg. Refs #287
(cherry picked from commit 0acfd90225)
2024-10-04 13:57:03 +02:00
Dimitry Ishenko
a5d1064189 [python] Fix hooks.py detection
(cherry picked from commit c6776e447a)
2024-10-04 08:17:03 +02:00
Witold Filipczyk
571c3772b4 [test] compilation fix 2024-10-03 15:48:19 +02:00
Witold Filipczyk
6ca72b5bf6 [inpfield] Cast to unsigned char * . Refs #315
(cherry picked from commit adecd52b3a)
2024-10-03 15:41:37 +02:00
Witold Filipczyk
504fdbe340 [python] module imp is deprecated. Refs #313
(cherry picked from commit 2577da8942)
2024-10-03 15:39:55 +02:00
pstumpf
5975184c90 Eliminate sed(1) GNUism
\| is an incompatible GNU extension to BREs.  This corrupts formatting of the elinkskeys(5) man page on any system where sed is not GNU sed (e.g. the BSDs).  Use ERE syntax instead.

(cherry picked from commit 42f2483350)
2024-10-03 15:38:21 +02:00
Witold Filipczyk
6b924b4d93 [configure.ac] bashism. Refs #285
(cherry picked from commit 27c03014f7)
2024-10-03 15:34:01 +02:00
Witold Filipczyk
4e11f6f8be [html5] Also add NAV element. Refs #282
(cherry picked from commit 103669e825)
2024-10-03 15:32:33 +02:00
Witold Filipczyk
fea622c365 [html5] Stubs for html_main and html_article. Refs #282
(cherry picked from commit ef80897185)
2024-10-03 15:31:15 +02:00
Witold Filipczyk
639718c5f0 Revert "[head] addcrlf". Refs #281
This reverts commit 90d4f17031.

(cherry picked from commit 389df54184)
2024-10-03 15:29:53 +02:00
Witold Filipczyk
eaacd5c557 [libcss] bump libcss to 0.9.2 and libdom to 0.4.2
Needs some tweaks. Code is compilable at least.

(cherry picked from commit 2fdb04a6ab)
2024-10-03 15:27:37 +02:00
Witold Filipczyk
8cd5ea6a98 [NEWS] 0.17.0 2023-12-25 12:25:27 +01:00
Witold Filipczyk
3ae1622d94 [meson] Added -Ddoc option, default true
With -Ddoc=false rebuilds are faster.
2023-12-23 14:12:46 +01:00
Witold Filipczyk
8d0054041b [select] Another try
Set fields of timeout manually.
2023-12-20 20:31:13 +01:00
Witold Filipczyk
f91d214820 [select] This code is problematic.
EINVAL on OpenBSD/i386.
2023-12-20 18:06:20 +01:00
Witold Filipczyk
6c32ce3c61 [gettext] Let it work also on Windows
When elinks.exe is located in the src subdirectory,
.gmo files are read from the po subdirectory.
2023-12-15 10:36:17 +01:00
Witold Filipczyk
93e9ac1b4c [gettext] Revision 1 is also valid
At least I think so.
2023-12-14 21:45:08 +01:00
Witold Filipczyk
dee0b28f97 [spidermonkey] meson.build also was missing 2023-12-10 16:42:32 +01:00
Witold Filipczyk
74906f2b0f [NEWS] 0.17.0rc2 2023-12-10 12:31:41 +01:00
Witold Filipczyk
6f11b9be8b [windows] Fixes for FSP (send and recv) 2023-12-09 19:57:08 +01:00
Witold Filipczyk
2ace5374c8 [cast] cast to intptr_t to silence compiler 2023-12-08 11:14:27 +01:00
Witold Filipczyk
b894447af1 [hash] drop const for key 2023-12-08 11:11:06 +01:00
Witold Filipczyk
fd4622d21b [win64] Updated curl 2023-12-07 13:03:48 +01:00
Witold Filipczyk
18bd6f269d [win32] Updated curl 2023-12-07 12:58:37 +01:00
Witold Filipczyk
0fbec94494 [ssl] Change order of includes
There was compilation failure on win32.
2023-12-07 12:52:34 +01:00
Witold Filipczyk
cb39af36ee [docker] Update for djgpp, binary archive for curl 2023-12-07 12:20:51 +01:00
Witold Filipczyk
43dd4f38a0 [c++] undef max and min
There were different definitions of them in sys/cdefs.h
2023-12-07 11:33:39 +01:00
Witold Filipczyk
425d779e15 [terminal] Avoid division by zero. Refs #276 2023-12-07 08:21:13 +01:00
Witold Filipczyk
e538a9f827 [terminal] use fd not 1 for ioctl 2023-12-06 08:21:29 +01:00
Witold Filipczyk
b580d78ba3 [spidermonkey] Makefile was missing 2023-12-04 14:21:21 +01:00
Witold Filipczyk
ee60a7e8e5 [NEWS] 0.17.0rc1 2023-12-02 09:06:50 +01:00
Witold Filipczyk
5d7403d23a [tcc] Skip -Wl,--no-copy-dt-needed-entries 2023-12-01 12:54:07 +01:00
Witold Filipczyk
1890a79b45 [Makefile] CXX was missing 2023-11-29 18:24:52 +01:00
Witold Filipczyk
8badb62c34 [document] I did not test it, but I guess it must be & prepended here 2023-11-29 16:15:34 +01:00
Witold Filipczyk
33c30a7840 [tcc] Wrapper for tcc to use with meson
meson does not support tcc yet, but with this wrapper you can build
elinks (no js version) with meson and save a few seconds.
This wrapper pretends to be gcc for meson.
While compiling it filters unsupported options, and execute tcc.

Compile it as:
gcc -O2 -o elinks_tcc elinks_tcc.c

Here is my mes_tcc.sh:
rm -rf /dev/shm/builddir2
export C_INCLUDE_PATH=/usr/local/lib/tcc/include:$HOME/include:/usr/include:/usr/local/include
CPPFLAGS="-I$HOME/include" \
CC=elinks_tcc \
meson setup /dev/shm/builddir2 \
-D88-colors=false \
-D256-colors=true \
-Dapidoc=false \
-Dbacktrace=false \
-Dbittorrent=false \
-Dbookmarks=false \
-Dbrotli=true \
-Dbzlib=false \
-Dcgi=true \
-Dcombining=true \
-Dfastmem=true \
-Dgemini=true \
-Dgettext=true \
-Dgnutls=true \
-Dgopher=true \
-Dgpm=false \
-Dguile=false \
-Dhtmldoc=false \
-Dlibcss=true \
-Dlibev=false \
-Dlibevent=true \
-Dopenssl=false \
-Dluapkg='luajit' \
-Dlzma=false \
-Dnls=true \
-Dnntp=false \
-Dpdfdoc=false \
-Dperl=false \
-Dprefix=$HOME \
-Dpython=false \
-Druby=false \
-Dsm-scripting=false \
-Dspidermonkey=false \
-Dterminfo=true \
-Dtre=false \
-Dtrue-color=true \
-Dutf-8=true \
-Dwithdebug=false \
-Dx=false \
-Dzlib=true \
-Dzstd=true

ninja -C /dev/shm/builddir2
2023-11-29 16:05:21 +01:00
Witold Filipczyk
a5d2119dbf [map] Reimplemented map as hash
Maybe it is slower, but C only.
2023-11-28 19:55:37 +01:00