theruran has quit [Quit: Connection closed for inactivity]
theruran has joined #picolisp
KomiaPoika has joined #picolisp
aw- has quit [Ping timeout: 240 seconds]
frostbyte_ has joined #picolisp
<
frostbyte_>
What happens if (fork) fails? The documentation doesn't mention that it even can.
<
frostbyte_>
Does anyone know how to mock fork failing on Linux?
<
abu[m]>
It can fail (e.g. too many processes). In that case an error is thrown.
<
frostbyte_>
Right. So, I would enter the debugger?
<
abu[m]>
Try (loop (fork)) - I don't dare 😉
<
frostbyte_>
Does testing for -1 make sense for how it's implemented?
<
frostbyte_>
Yeah, I'm not keen to test it that way.
<
abu[m]>
-1 is tested internally, yes
<
abu[m]>
(vi 'fork)
<
frostbyte_>
fork 271931 doc "@doc/refF.html" *Dbg ((1563 "@src/flow.l" llvm pico))
<
abu[m]>
In any case, I expect "too many processes" or similar
<
frostbyte_>
I'm very new, and these 3 lines don't really tell me anything.
<
abu[m]>
Oh, it seems you use an older PicoLisp
<
frostbyte_>
Really? I downloaded it only a few weeks ago.
<
frostbyte_>
22.2.13
<
abu[m]>
Ah, ok, perfect :)
<
abu[m]>
I get the source if I do (vi 'fork)
<
abu[m]>
The above looks more like (show 'fork)
<
frostbyte_>
I'll try that. I actually did (v fork).
<
frostbyte_>
Yep, source.
<
abu[m]>
yes, ok, it shows the in-memory symbol
<
frostbyte_>
So, it shows (forkLisp). What do I press to jump to that definition?
<
abu[m]>
Press shift-K on the symbol
<
frostbyte_>
Thankyou.
<
abu[m]>
Welcome :)
<
abu[m]>
Then it gets to ((lt0 (fork)) (forkErr Exe))
<
abu[m]>
ok, must go. bbl
<
frostbyte_>
That was a great first experience on this channel. So fast and to the point. Much appreciated.
<
beneroth>
welcome frostbyte_ :)
KomiaPoika has quit [Ping timeout: 260 seconds]