[noctool-cvs] CVS source
Jim Prewett
download at hpc.unm.edu
Thu Feb 12 21:19:58 UTC 2009
Hi Ingvar,
I made a couple of fixes (we should see that commit message any time now).
I *can't* get this to give me an error message! :P
Jim
James E. Prewett Jim at Prewett.org download at hpc.unm.edu
Systems Team Leader LoGS: http://www.hpc.unm.edu/~download/LoGS/
Designated Security Officer OpenPGP key: pub 1024D/31816D93
HPC Systems Engineer III UNM HPC 505.277.8210
On Thu, 12 Feb 2009, imattsson wrote:
> Update of /project/noctool/cvsroot/source
> In directory cl-net:/tmp/cvs-serv21098
>
> Added Files:
> fork-test.lisp
> Log Message:
> IM
>
> Rough test scaffolding to diagnose "crossed streams" issue.
>
>
>
> --- /project/noctool/cvsroot/source/fork-test.lisp 2009/02/12 20:41:09 NONE
> +++ /project/noctool/cvsroot/source/fork-test.lisp 2009/02/12 20:41:09 1.1
> (defun worker (id lines)
> (let ((id-string (format nil "~4,'0d" id)))
> (with-pty (pty (sb-ext:process-pty (sb-ext:run-program "/usr/bin/env" (list "true" id-string) :wait nil :pty t)))
> (loop for line = (read-line pty nil nil)
> for count from 0 below lines
> while line
> do (progn
> (unless (string= line id-string)
> (format t "Thread ~d, expected ~a, saw ~a~%" id id-string line))
> (sleep (* 0.1 (random 10))))))))
>
> (defun main (workers &optional (line-count 100))
> (loop for n from 1 to workers
> collect (sb-thread:make-thread #'(lambda () (worker n line-count)))))
>
> _______________________________________________
> noctool-cvs mailing list
> noctool-cvs at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/noctool-cvs
>
More information about the noctool-cvs
mailing list