The solution with fork() is more general, but it unnecessarily produces two new
process: one in exe_no_stdin(), one in system(). The solution with FD_CLOEXEC
is simpler as it only requires changing and restoring a flag of stdin, but I
suspect it may not be available in all OSes elinks can be compiled for.
SpiderMonkey was updated to mozjs24. If you want to build elinks
with ecmascript support, you must compile using g++ with -fpermissive .
There is a lot of warnings.
There are some memleaks in ecmascript code, especially related to JSAutoCompartment.
I don't know yet, where and how to free it.
Debian does not support mozjs24, so I'm going to gradually update SpiderMonkey version.
ui.clipboard_file is filename of the clipboard file. This file can be a named pipe.
See contrib/clipboard/clip.sh how to set up copying to clipboard using socat and xclip.
Just run clip.sh (it will be running in a loop) before starting elinks and
set ui.clipboard_file = "~/.elinks/clipboard.fifo".
Weak points:
- alignof
- js problems
Todo:
- make js work with C++ and mozjs-17
- then mozjs-24
- then mozjs-52
- then mozjs-60
- decrease number of warnings
This legacy header appears to be unused. Removing its includes
avoids numerous warnings when compiling with musl libc:
/usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include <sys/signal.h> to <signal.h> [-Wcpp]
If ELinks was configured --without-x, the build failed at
xprop_to_string:
.../src/osdep/osdep.c:500: error: expected ‘)’ before ‘*’ token
Fix by moving xprop_to_string into the #ifdef HAVE_X11 section.
Reported by Thomas Adam.
If Xutf8TextPropertyToTextList or XmbTextPropertyToTextList returns a
positive number, that means some characters were unconvertible and
have been replaced with XDefaultString(). Use the resulting string
even in that case, as if the function had returned Success.
The previous version ignored the string and didn't even free it.
gnome-terminal 2.30.2 expects UTF-8 in the "OSC Ps ; Pt BEL" sequence
that sets the window title. However, XGetWMName typically returns the
title in "STRING" (Latin-1) or "COMPOUND_TEXT" (escape sequences)
encoding. Recode the title to restore it correctly. This helps
especially in the fi_FI.UTF-8 locale, where gnome-terminal has "Pääte"
as the default title.
Related to bugs 885 and 336.