Add NeoNet Yabasic networking FFI library, fix fcitx5 service and WM context menus, install yabasic-doc and mandoc

This commit is contained in:
Luxferre committed 2026-10-27 07:39:07 +02:00
1 parent fb3723fab4
commit 726500085a
33 files changed
+2617 -69

No files matched your search

+20 -9
View File
@@ -31,6 +31,7 @@
#include <sstream>
#include <string>
#include <sys/stat.h>
#include <sys/wait.h>
#include <unistd.h>
#include <vector>
@@ -108,18 +109,24 @@ bool writeIntFile(const std::string& path, int value) {
void runAsyncCmd(const std::string& cmd) {
pid_t pid = ::fork();
if (pid == 0) {
::setsid();
int nullfd = ::open("/dev/null", O_RDWR);
if (nullfd >= 0) {
::dup2(nullfd, STDIN_FILENO);
::dup2(nullfd, STDOUT_FILENO);
::dup2(nullfd, STDERR_FILENO);
if (nullfd > 2) {
::close(nullfd);
if (::fork() == 0) {
::setsid();
int nullfd = ::open("/dev/null", O_RDWR);
if (nullfd >= 0) {
::dup2(nullfd, STDIN_FILENO);
::dup2(nullfd, STDOUT_FILENO);
::dup2(nullfd, STDERR_FILENO);
if (nullfd > 2) {
::close(nullfd);
}
}
execl("/bin/sh", "sh", "-c", cmd.c_str(), static_cast<char*>(nullptr));
_exit(0);
}
execl("/bin/sh", "sh", "-c", cmd.c_str(), static_cast<char*>(nullptr));
_exit(0);
} else if (pid > 0) {
int st = 0;
(void)::waitpid(pid, &st, 0);
}
}
@@ -674,6 +681,8 @@ static int xdrawer_run_main(int argc, char** argv) {
sigemptyset(&sa.sa_mask);
sigaction(SIGTERM, &sa, nullptr);
sigaction(SIGINT, &sa, nullptr);
signal(SIGCHLD, SIG_IGN);
signal(SIGPIPE, SIG_IGN);
bananarchy::NeoWindow neo;
if (!neo.create("xdrawer", "XDrawer", "XDrawer", kWinX, kWinY, kWinWidth,
@@ -863,6 +872,7 @@ static int xdrawer_run_main(int argc, char** argv) {
"xdialer.pid", "xcalllog.pid", "xcallscreen.pid", "xcontacts.pid",
"xsms.pid", "xfiles.pid", "xcamera.pid", "xthemes.pid",
"xmodem.pid", "xnetworks.pid", "xringtones.pid", "xwallpapers.pid",
"xmusic.pid",
};
for (const char* pf : kPids) {
int p = readIntFile(getRuntimeFile(pf), -1);
@@ -893,6 +903,7 @@ static int xdrawer_run_main(int argc, char** argv) {
closeOtherPlugin("xnetworks.pid", "/tmp/dwm_plugin_networks.fifo");
closeOtherPlugin("xringtones.pid", "/tmp/dwm_plugin_ringtones.fifo");
closeOtherPlugin("xwallpapers.pid", "/tmp/dwm_plugin_wallpapers.fifo");
closeOtherPlugin("xmusic.pid", "/tmp/dwm_plugin_music.fifo");
if (::access("/tmp/dwm_plugin_dmenu.active", F_OK) == 0) {
int dfd = ::open("/tmp/dwm_plugin_dmenu.fifo", O_WRONLY | O_NONBLOCK | O_CLOEXEC);
if (dfd >= 0) {