1
0
mirror of https://github.com/janet-lang/janet synced 2025-06-26 23:22:51 +00:00

317 Commits

Author SHA1 Message Date
Calvin Rose
2fedb67cb3 formatting 2025-04-05 17:32:07 -05:00
Calvin Rose
bdab93c999 Add {:err :out} option to os/spawn.
This special case in the os/spawn interface allows easily
redirecting both stderr and stdout to the same pipe.
2025-04-05 17:30:46 -05:00
Calvin Rose
a9ff8b388f Add os/getpid 2025-04-05 16:20:17 -05:00
Calvin Rose
73334f3485 Prepare for 1.38.0 release. 2025-03-18 21:14:45 -05:00
Calvin Rose
9538b8a77c
Merge pull request #1562 from pyrmont/bugfix.subprocess-cleanup
Improve subprocess-related docstrings and functions
2025-03-03 18:47:59 -08:00
Michael Camilleri
4b5a2a14c0
Update year in copyright disclaimer to 2025 2025-03-04 11:24:09 +09:00
Michael Camilleri
8f8b6ed001
Remove note on cancellation and tidy up wording 2025-03-03 23:28:37 +09:00
Calvin Rose
e0a0e2ed42 Prevent multi-scheduling with os/proc-wait. (address #1562) 2025-03-02 10:44:15 -06:00
Michael Camilleri
39f5c539d7
Clarify wording of docstrings further 2025-03-02 13:25:14 +09:00
Michael Camilleri
1b6437a4f8
Remove unnecessary returns 2025-03-02 08:30:51 +09:00
Michael Camilleri
c62c1a58f0
Reword documentation relating to subprocess creation 2025-03-02 08:29:32 +09:00
Calvin Rose
3fc2be3e6e Use _Exit since it is standard in c99 2024-10-11 20:10:04 -05:00
Calvin Rose
3894f4021a Update copyright date. 2024-09-29 16:07:24 -05:00
Calvin Rose
9ffec43d2b Fix endianess issues on s390x architecture.
Endianess code should use memcpy instead of unions. This apparently
is more correct on old, optimizing compilers. Technically, this is
compilers being really stupid but we work with what we got.

That said, this endianess code is more complicated than needed.
2024-09-06 10:23:31 -05:00
Calvin Rose
f3048a3d6b Update documentation. 2024-08-05 20:17:00 -05:00
Calvin Rose
accac6c662 Add options to os/pipe for custom blocking behavior.
Useful for create pipelines on unix.

Also add bundle/whois to help diagnose where bundle installed files
came from.
2024-08-05 19:52:20 -05:00
Calvin Rose
771956b5b6 Fix some -fsanitize=undefined behavior for #1475
Also fix issue with os/clock and default values that were incorrect.
The api shold have been a little nicer here to prevent this issue.
2024-07-17 08:50:02 -05:00
Calvin Rose
0f4ecd93ab Fix #1469 2024-06-26 08:54:26 -05:00
Philip Nelson
0b51ab157d Fix typos 2024-06-16 06:59:27 -07:00
Calvin Rose
1225cd31c8 Assert that prime-bunlde-paths is working. 2024-05-26 10:54:00 -05:00
Calvin Rose
f7c90bc1ff Add testing for making and removing directory. 2024-05-26 10:21:52 -05:00
Calvin Rose
7d3acc0ed6 Get rid of "extended locale" support.
While useful on some platforms, behavior seems to be different across
the board, making use difficult.
2024-05-19 18:01:20 -05:00
Calvin Rose
2637b33957 Include locale.h and xlocale.h on some platforms. 2024-05-19 17:40:39 -05:00
Calvin Rose
634429cf61 Merge branch 'locales' 2024-05-19 17:05:49 -05:00
Calvin Rose
876b7f106f OpenBSD does not work with LC_*_MASK stuff. 2024-05-18 17:22:10 -05:00
Calvin Rose
809b6589a1 Put limits.h back. 2024-05-18 15:31:23 -05:00
Calvin Rose
02f53ca014 Formatting. 2024-05-18 15:21:37 -05:00
Calvin Rose
0b03ddb21b More work on setting locale for extended locale support. 2024-05-18 15:20:22 -05:00
Calvin Rose
ea5d4fd3af JANET_BSD not defined on apple. 2024-05-18 14:24:51 -05:00
Calvin Rose
e6b73f8cd1 BSD, use xlocale for thread safe functionality 2024-05-18 14:11:05 -05:00
Calvin Rose
af232ef729 windows needs a distinct implementation from posix for thread safety.
I must say, the windows solution is a lot simpler.
2024-05-18 14:02:20 -05:00
Calvin Rose
2e2f8abfc0 Work on add locales.
Need to be careful not to mess with %j formatter, or
in some other places.
2024-05-18 13:23:33 -05:00
Calvin Rose
bf19920d65 Improve casting. 2024-04-18 03:29:45 -05:00
Calvin Rose
f92f3eb6fa Address #1434 - add dynamic bindings for module state. 2024-04-15 16:20:13 -05:00
John W Higgins
623da131e5 os/clock docstring typos 2024-03-27 22:32:27 -07:00
John W Higgins
e89ec31ae5 Add additional format options for os/clock 2024-03-27 22:32:27 -07:00
Calvin Rose
03ae2ec153
Merge pull request #1394 from amano-kenji/master
Improve documentation on subprocess API
2024-02-19 11:25:17 -08:00
Calvin Rose
e66dc14b3a Formatting. 2024-02-17 13:35:07 -06:00
amano.kenji
674b375b2c
Improve documentation on subprocess API 2024-02-13 05:34:52 +00:00
llmII
7e94c091eb
Fix: os/proc-wait
As discused over gitter, `WIFSIGNALED` macro must be checked before one
uses the WTERMSIG macro. This change reflects that necessity and adds a
final else clause which will panic if no status code could be
determined.
2024-02-12 23:06:08 -06:00
Calvin Rose
f6df8ff935 Expose _exit to skip certain cleanup with os/exit 2024-02-03 14:12:10 -06:00
Calvin Rose
a10b4f61d8 Address #1337 (leet!).
Changes a few scheduling details and adds a 0 byte explicitly to
symbols created via gensym.
2023-12-16 16:15:46 -06:00
Calvin Rose
16f409c6a9 Typo for SIGALARM in os/proc-kill 2023-11-21 21:51:56 -06:00
Calvin Rose
21ebede529 Move posix-fork inside correct if-def
Don't compile if processes are disabled.
2023-10-15 11:03:26 -05:00
Calvin Rose
cb25a2ecd6 Avoid using execvpe function. 2023-10-08 21:33:15 -05:00
Calvin Rose
549ee95f3d Add os/posix-exec (along os/posix-fork)
Useful for old-style unix daemons, start up scripts, and so on.
Easy to add on top of os/execute.

May want to consider allowing the same IO redirection as os/execute
and os/spawn.

May also want to put both fork and exec behind a config switch since I
suppose some systems may not support them, although I don't know of any
concrete examples.
2023-10-08 21:03:08 -05:00
Calvin Rose
990f6352e0 Allow for unregistered streams w/ kqueue. 2023-10-08 17:21:42 -05:00
Calvin Rose
b344702304 Merge branch 'master' into ev-epoll-fewer-syscalls 2023-10-08 17:20:20 -05:00
Calvin Rose
7f852b8af4 Handle refcounts in posted events. 2023-10-08 13:14:36 -05:00
Calvin Rose
cf4901e713 Update docstring for os/posix-fork 2023-10-08 11:54:25 -05:00