Handbook
Glossary
unix-system-call ( quot -- quot )
Vocabulary
unix
Inputs
quot
an
object
Outputs
quot
an
object
Definition
USING:
combinators.short-circuit
combinators.smart
generalizations
kernel
libc
sequences
sequences.generalizations
;
IN:
unix
MACRO::
unix-system-call
( quot -- quot )
quot
inputs
:>
n quot
first
:>
word 0
:>
ret!
f
:>
failed!
[
[
n
ndup
quot
call
ret! ret
{
[
unix-call-failed?
dup
failed!
]
[
drop
errno
EINTR
=
]
}
1&&
]
loop
failed
[
n
narray
errno
dup
strerror
word
unix-system-call-error
]
[
n
ndrop
ret
]
if
]
;