mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Fix MODE=tinylinux build
This commit is contained in:
parent
4bcb107cb0
commit
0e0398cd5d
2 changed files with 10 additions and 3 deletions
|
@ -4823,6 +4823,7 @@ static int LuaBlackhole(lua_State *L) {
|
||||||
wontreturn static void Replenisher(void) {
|
wontreturn static void Replenisher(void) {
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
VERBOSEF("(token) replenish worker started");
|
VERBOSEF("(token) replenish worker started");
|
||||||
|
strace_enabled(-1);
|
||||||
signal(SIGINT, OnTerm);
|
signal(SIGINT, OnTerm);
|
||||||
signal(SIGHUP, OnTerm);
|
signal(SIGHUP, OnTerm);
|
||||||
signal(SIGTERM, OnTerm);
|
signal(SIGTERM, OnTerm);
|
||||||
|
@ -7149,7 +7150,7 @@ static void ReplEventLoop(void) {
|
||||||
lua_repl_completions_callback = HandleCompletions;
|
lua_repl_completions_callback = HandleCompletions;
|
||||||
lua_initrepl(L);
|
lua_initrepl(L);
|
||||||
EnableRawMode();
|
EnableRawMode();
|
||||||
EventLoop(100);
|
EventLoop(-1);
|
||||||
DisableRawMode();
|
DisableRawMode();
|
||||||
lua_freerepl();
|
lua_freerepl();
|
||||||
lua_settop(L, 0); // clear stack
|
lua_settop(L, 0); // clear stack
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "libc/calls/calls.h"
|
#include "libc/calls/calls.h"
|
||||||
#include "libc/calls/struct/sigaction.h"
|
#include "libc/calls/struct/sigaction.h"
|
||||||
#include "libc/calls/struct/timespec.h"
|
#include "libc/calls/struct/timespec.h"
|
||||||
|
#include "libc/dce.h"
|
||||||
#include "libc/dns/dns.h"
|
#include "libc/dns/dns.h"
|
||||||
#include "libc/errno.h"
|
#include "libc/errno.h"
|
||||||
#include "libc/fmt/conv.h"
|
#include "libc/fmt/conv.h"
|
||||||
|
@ -122,7 +123,7 @@ static void NewClient(struct Client *client, const struct sockaddr_in *addr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void *Worker(void *arg) {
|
static void *Worker(void *arg) {
|
||||||
while (!a_finished) {
|
while (!a_finished) {
|
||||||
bool32 ok;
|
bool32 ok;
|
||||||
uint32_t dwFlags;
|
uint32_t dwFlags;
|
||||||
|
@ -195,12 +196,17 @@ void *Worker(void *arg) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnTerm(int sig) {
|
static void OnTerm(int sig) {
|
||||||
a_termsig = sig;
|
a_termsig = sig;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
if (!IsWindows()) {
|
||||||
|
tinyprint(2, "error: this program is intended for windows\n", NULL);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
prog = argv[0];
|
prog = argv[0];
|
||||||
if (!prog) {
|
if (!prog) {
|
||||||
prog = "ab";
|
prog = "ab";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue