Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- child() { # dummy function
- for ((n=1; n<5; ++n)); do
- printf '.'
- sleep 1
- done
- echo
- }
- fork_child() {
- child &
- echo $!
- }
- FID=$(fork_child)
- echo $FID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement