[plt-scheme] custodian + process/ports

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Tue Jul 1 11:38:14 EDT 2008

I would create my own input port using 'make-input-port, which might 
work just as a pipe, but with 'close to close the custodian that control 
the gnuplot process.

Hope that helps.

Chongkai

Tom Schouten wrote:
> Hello,
>
> How can a process created with process/ports be properly terminated (without creating zombie 
> processes) when its stdin is closed by a custodian?
>
> I.e.: closing gnuplot's stdin produced by the following code creates a defunct process.
>
> (define (open-gnuplot)
>   (match (process/ports (current-output-port) #f
>                         (current-output-port) "gnuplot")
>          ((list stdout
>                 stdin
>                 pid
>                 stderr
>                 control)
>           stdin)))
>
>
> Cheers,
> Tom
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>   



Posted on the users mailing list.