update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
|
|
@ -2,7 +2,7 @@
|
|||
-export([start/0]).
|
||||
|
||||
start() ->
|
||||
spawn(fork,child,[]),
|
||||
erlang:spawn( fun() -> child() end ),
|
||||
io:format("This is the original process~n").
|
||||
|
||||
child() ->
|
||||
|
|
|
|||
6
Task/Fork/Racket/fork-1.rkt
Normal file
6
Task/Fork/Racket/fork-1.rkt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#lang racket
|
||||
(define-values [P _out _in _err]
|
||||
(subprocess (current-output-port) (current-input-port) (current-error-port)
|
||||
(find-executable-path "du") "-hs" "/usr/share"))
|
||||
;; wait for process to end, print messages as long as it runs
|
||||
(let loop () (unless (sync/timeout 10 P) (printf "Still running...\n") (loop)))
|
||||
4
Task/Fork/Racket/fork-2.rkt
Normal file
4
Task/Fork/Racket/fork-2.rkt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#lang racket
|
||||
(require ffi/unsafe)
|
||||
(define fork (get-ffi-obj 'fork #f (_fun -> _int)))
|
||||
(printf ">>> fork() => ~s\n" (fork))
|
||||
Loading…
Add table
Add a link
Reference in a new issue