Moomoo
Child process doesn't exit on .kill()
Yeah I'm just glad I'm just making a little development tool for myself and not something that needs to run in production somewhere. It looks like Deno was actually killing the process I spawned, but not any child processes that spawned in turn, so I need to do that manually.
Anyway, thank you for he help 🙂
8 replies
Child process doesn't exit on .kill()
Well, I got something working by calling
wmic process where ParentProcessId='${pid}' get ProcessId
to recursively get all the child process PIDs of the process I want to kill, and killing them all individually. I'm not sure if that's the recommended way of doing it, but it seems to work.8 replies
Child process doesn't exit on .kill()
Ok, so it looks like
SIGINT
and SIGBREAK
are not implemented on Windows, and they're not going to be. I have no idea how we're suppoesd to kill child processes on Windows if the only two signals that are supported aren't actually supported.8 replies
Child process doesn't exit on .kill()
Hey, thanks for your response 🙂
.kill()
sends SIGTERM
by default. I tried SIGKILL
to no avail, and when I try SIGINT
I get a TypeError: Invalid signal: SIGINT
. But I did just spot in lib.deno.ns.d.ts
that
On Windows onlySo I'll give"SIGINT"
(CTRL+C) and"SIGBREAK"
(CTRL+Break) are supported.
SIGBREAK
a shot.8 replies
Import from variable path?
You can use dynamic imports: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import
const {app, serve} = await import(isSelfHost ? "./selfhost.js" : "./cloudflare.js");
3 replies
Deno.inspect, how to log class instances with getters
Yeah I don't see the getters either with a simple test case. It might be a bug. Someone opened an issue about it recently: https://github.com/denoland/deno/issues/16408. They closed it, but you could ask them to reopen it, or create a new issue.
10 replies
how to ssr preact (without fresh)
Sounds like you want hydration: https://www.jovidecroock.com/blog/hydration-and-preact
8 replies
is it possible to change how tsx bundles to js?
I doubt that's possible. As far as I understand, Deno just uses TypeScript's JSX transformer, which always turns JSX into a function call. I don't think it's possible to add something like a custom Babel transformer to Deno, which is probably what it would take to do what you want.
5 replies
File line operations
If you want to avoid reading the whole file, you could use a readable stream to read it in chunks: https://deno.land/api@v1.27.1?s=Deno.FsFile#prop_readable
16 replies