Calvin Rose
08e20e912d
Use pthread_sigmask when adding signal handlers.
2023-08-19 17:30:55 -05:00
Calvin Rose
f45571033c
Add os/sigaction for signal handling.
...
Also improve interrupts to work better with busy loops
and signals.
2023-08-19 13:26:29 -05:00
Michael Camilleri
f977ace7f8
Avoid prematurely closing file descriptors when redirecting IO
2023-06-23 15:50:19 +09:00
Calvin Rose
63bb93fc07
Fix isatty code to not use functions only defined if ev is enabled.
2023-06-19 07:14:56 -05:00
Calvin Rose
9a2897e741
Run through astyle with manual corrections
2023-06-08 13:01:49 -05:00
Ico Doornekamp
e0ea844d50
added os/isatty, do not enable colors if stdout is not a tty
2023-06-02 16:59:54 +02:00
tionis
4dfc869b8a
fixed formatting in src/core/os.c
2023-05-21 15:55:11 +02:00
tionis
b4b1c7d80b
Merge branch 'janet-lang:master' into master
2023-05-21 13:51:24 +00:00
tionis
e53c03028f
ignoring signals on windows in os/proc-kill again
2023-05-21 15:50:15 +02:00
Ico Doornekamp
e8e5f66f4c
Implement janet_gettime() for win32 and macos; need testing
2023-05-21 07:29:27 +02:00
Ico Doornekamp
aaf3d08bcd
Added 'source' argument to os/clock to select the clock source
2023-05-21 07:29:27 +02:00
tionis
0f35acade1
use SIGTERM for os/proc-kill signal test
2023-05-16 18:47:38 +02:00
tionis
56d72ec4c5
support sending signals to processes on windows
2023-05-16 17:07:51 +02:00
tionis
0b58e505ee
os/proc-kill now accepts an optional signal to send
2023-05-16 00:44:19 +02:00
Calvin Rose
84a4e3e98a
Update CHANGELOG.
...
and format.
2023-05-11 18:03:38 -05:00
Ico Doornekamp
5cd729c4c1
Added os.strftime()
2023-05-11 06:08:19 +02:00
Calvin Rose
e4be5992b3
Address issue with #1131
2023-05-10 18:43:33 -05:00
Calvin Rose
347721ae40
Fix macos behavior - Closes #1097 , Fixes #1015
2023-04-24 09:37:49 -05:00
Charlotte Koch
575af763f6
os/which can return :dragonfly
...
While here, document that :bsd is another possible return value.
2023-03-07 06:45:31 -08:00
Calvin Rose
b032d94877
Add sandboxing API.
...
The sandboxing API is meant to make janet a bit more attractive
for certain application embedding use cases. The sandboxing API
puts limits on what system resources the interpreter can access.
2023-02-06 09:05:57 -06:00
Calvin Rose
05e7f974e3
Add os/compiler to the core.
...
Allows querying what compiler was used to compile Janet.
2023-01-28 14:00:02 -06:00
Calvin Rose
9106228787
Add :riscv32 and :riscv32 values for os/arch.
2023-01-27 11:23:57 -06:00
sogaiu
8f598d6f96
Update os/realpath docstring
2023-01-23 12:55:04 +09:00
Calvin Rose
07a3158fba
Merge pull request #1060 from ianthehenry/doc-typos
...
Fix some docstring typos
2023-01-21 16:21:57 -06:00
bakpakin
a490937cd9
Add :mingw value when getting the OS setting when compiled with mingw.
2023-01-21 11:50:03 -06:00
bakpakin
93b469885a
Initial Mingw support with Makefile.
...
Also add a macro JANET_MSVC to distinguish between
a windows build (JANET_WINDOWS) and a build with msvc.
2023-01-21 10:37:34 -06:00
Ian Henry
ab224514f0
Fix some docstring typos.
2023-01-18 19:41:56 -08:00
Calvin Rose
b73855b193
Merge branch 'master' of github.com:janet-lang/janet
2023-01-07 15:05:16 -06:00
Calvin Rose
a0f40042cb
Update copyright year.
2023-01-07 15:03:35 -06:00
Charlotte Koch
23de953fbd
(os/cpu-count) should not be defined at all with JANET_REDUCED_OS
2022-12-15 20:16:43 -08:00
Calvin Rose
914a4360e7
Indicate version bump since header file changed.
2022-11-05 16:38:52 -05:00
Calvin Rose
60e0f32f1a
Fix os/open with :rw permissions on posix.
2022-10-24 19:39:58 -05:00
Calvin Rose
6b27008c99
Fix os/date with nil argument.
2022-10-10 15:24:28 -05:00
Calvin Rose
ab068cff67
Remove WNOWAIT code on linux.
...
Would cause os/proc-wait to block in some circumstances.
2022-10-10 14:23:17 -05:00
Calvin Rose
5b2169e0d1
Fix docstring.
2022-08-02 14:58:32 -05:00
Calvin Rose
e316ccb1e0
Use _tzset() on windows before localtime_s
2022-06-19 08:49:54 -05:00
Calvin Rose
dfa78ad3c6
typo
2022-05-28 12:23:28 -05:00
Calvin Rose
6ada2a458f
Fixes on bsd for os/cpu-count.
2022-05-28 12:21:44 -05:00
Calvin Rose
8145f3b68d
On linux, available CPUs is more useful information.
2022-05-28 12:19:25 -05:00
Calvin Rose
48289acee6
Add os/cpu-count functionality.
2022-05-28 12:01:23 -05:00
John Gabriele
473eec26c1
os.c doc formatting typo
2022-04-29 23:57:37 -04:00
bakpakin
427f7c362e
Fix os/execute regression.
2022-04-27 22:59:27 -05:00
Calvin Rose
73f5c41fae
Address #968 Ignore :pipe arguments in os/execute.
...
They are only useful in os/spawn. Also update docstrings.
2022-04-27 20:13:10 -05:00
John Gabriele
811125a760
os.c docstrings
...
Some code backticks in docstrings where useful. Also some light editing of punctuation, etc.
2022-04-17 20:42:32 -04:00
Jason Pepas
e9870b293f
Remove unneeded includes
2022-03-21 21:28:13 -05:00
Jason Pepas
ab910d060b
Move AvailabilityMacros.h import into util.c
2022-03-21 21:23:09 -05:00
Calvin Rose
3715d7a184
Auto update copyright date.
2022-03-21 18:22:59 -05:00
Jason Pepas
f270739f9f
Refactor __MACH__ to JANET_APPLE
2022-03-17 01:20:55 -05:00
Alberto González Palomo
fe8e718183
Add ppc64 to os/arch
...
Same as #431 (Add ppc to os/arch) but for the 64-bit version.
This is tested on a Power9 CPU in Little-Endian mode, on Linux.
2022-01-21 23:08:57 +01:00
Calvin Rose
3df7921fdc
Don't call wait twice when closing or gcing.
2021-11-27 09:05:43 -06:00