Skip to content

Commit

Permalink
programs: Run curl in background so it doesn't block the system
Browse files Browse the repository at this point in the history
  • Loading branch information
osnr committed Sep 29, 2024
1 parent d42e0d8 commit db6b83c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virtual-programs/programs.folk
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ When (non-capturing) /type/ /obj/ has a program {
# way of finding the 'authoritative' node on the local
# network, or broadcasting out, and getting pages from
# there.
puts stderr "programs: WARNING: Faulting to folk0 to try to get program $obj.folk"
exec curl --output "$::env(HOME)/folk-printed-programs/$obj.folk" \
"http://folk0.local:4273/printed-programs/$obj.folk"
"http://folk0.local:4273/printed-programs/$obj.folk" &
# HACK: It won't be reloaded until you redetect the tag.
}
set fd [open "$::env(HOME)/folk-printed-programs/$obj.folk" r]
}
Expand Down

0 comments on commit db6b83c

Please sign in to comment.