-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
debug.z-run
25 lines (17 loc) · 1.26 KB
/
debug.z-run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/dev/null
:: sleep / 30s :: test "${#}" -eq 0 ; sleep -- 30s
:: sleep / 1h :: test "${#}" -eq 0 ; sleep -- 1h
:: sleep / loop :: printf -- '.' ; sleep -- 1s ; exec -- "${ZRUN}" ':: sleep / loop' "${@}"
:: sleep / bomb :: printf -- '.' ; sleep -- 1s ; "${ZRUN}" ':: sleep / bomb' "${@}"
:: env :: test "${#}" -eq 0 ; tr '\0' '\n' < "/proc/${$}/environ"
:: env / loop :: printf -- '--------\n' ; tr '\0' '\n' < "/proc/${$}/environ" ; sleep 1s ; exec -- "${ZRUN}" ':: env / loop' "${@}"
:: env / bomb :: printf -- '--------\n' ; tr '\0' '\n' < "/proc/${$}/environ" ; sleep 1s ; "${ZRUN}" ':: env / bomb' "${@}"
:: lsof :: test "${#}" -eq 0 ; lsof -p "${$}" -w
:: lsof / loop :: printf -- '--------\n' ; lsof -p "${$}" -w ; sleep -- 1s ; exec -- "${ZRUN}" ':: lsof / loop' "${@}"
:: lsof / bomb :: printf -- '--------\n' ; lsof -p "${$}" -w ; sleep -- 1s ; "${ZRUN}" ':: lsof / bomb' "${@}"
:: touch :: test "${#}" -eq 0 ; touch -- ./touch.z-run
:: touch / loop :: printf -- '.' ; touch -- ./touch.z-run ; sleep 1s ; exec -- "${ZRUN}" ':: touch / loop' "${@}"
:: touch / bomb :: printf -- '.' ; touch -- ./touch.z-run ; sleep 1s ; "${ZRUN}" ':: touch / bomb' "${@}"
&&__ _/touch.z-run
:: true :: exec -- true "${@}"
:: false :: exec -- false "${@}"