Better behavior printing
This commit is contained in:
parent
815294cd2b
commit
b2eef0c54a
|
@ -128,11 +128,11 @@
|
||||||
(hash-keys old-processes))))
|
(hash-keys old-processes))))
|
||||||
(define newpidstr (format-pids (cons newpid (cdr pids)))) ;; replace parent pid
|
(define newpidstr (format-pids (cons newpid (cdr pids)))) ;; replace parent pid
|
||||||
(with-color BRIGHT-GREEN
|
(with-color BRIGHT-GREEN
|
||||||
(output "~a spawned from ~a (~a total processes now)\n"
|
(output "~a ~v spawned from ~a (~a total processes now)\n"
|
||||||
newpidstr
|
newpidstr
|
||||||
|
behavior
|
||||||
pidstr
|
pidstr
|
||||||
newcount))
|
newcount))
|
||||||
(output "~a's behavior: ~v\n" newpidstr behavior)
|
|
||||||
(unless (boring-state? state)
|
(unless (boring-state? state)
|
||||||
(output "~a's initial state:\n" newpidstr)
|
(output "~a's initial state:\n" newpidstr)
|
||||||
(output-state state))
|
(output-state state))
|
||||||
|
@ -141,11 +141,14 @@
|
||||||
(pretty-print-gestalt gestalt (current-error-port))))]
|
(pretty-print-gestalt gestalt (current-error-port))))]
|
||||||
[(quit)
|
[(quit)
|
||||||
(when (or show-process-lifecycle? show-actions?)
|
(when (or show-process-lifecycle? show-actions?)
|
||||||
(with-color BRIGHT-RED
|
|
||||||
(output "~a exited (~a total processes now)\n" pidstr newcount))
|
|
||||||
(match (hash-ref old-processes (car pids) (lambda () #f))
|
(match (hash-ref old-processes (car pids) (lambda () #f))
|
||||||
[#f (void)]
|
[#f (void)]
|
||||||
[(process gestalt _behavior state)
|
[(process gestalt behavior state)
|
||||||
|
(with-color BRIGHT-RED
|
||||||
|
(output "~a ~v exited (~a total processes now)\n"
|
||||||
|
pidstr
|
||||||
|
behavior
|
||||||
|
newcount))
|
||||||
(unless (boring-state? state)
|
(unless (boring-state? state)
|
||||||
(output "~a's final state:\n" pidstr)
|
(output "~a's final state:\n" pidstr)
|
||||||
(output-state state))
|
(output-state state))
|
||||||
|
|
Loading…
Reference in New Issue