[racket] Detecting named pipes Re: users Digest, Vol 85, Issue 3

From: Axel (axel.schnell at gmx.de)
Date: Sun Sep 2 14:13:30 EDT 2012

Am Sonntag, 2. September 2012, 12:00:02 schrieb users-request at racket-lang.org:
> Send users mailing list submissions to
> 	users at racket-lang.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.racket-lang.org/users/listinfo
> or, via email, send a message with subject or body 'help' to
> 	users-request at racket-lang.org
> 
> You can reach the person managing the list at
> 	users-owner at racket-lang.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of users digest..."
> 
> 
> [Racket Users list:
>  http://lists.racket-lang.org/users]
> 
> 
> Today's Topics:
> 
>    1. Re: Static blog generator (Paulo J. Matos)
>    2. Detecting named pipe (Paulo J. Matos)
> 
> Message: 2
> Date: Sun, 02 Sep 2012 14:25:37 +0100
> From: "Paulo J. Matos" <paulo at matos-sorge.com>
> To: users at racket-lang.org
> Subject: [racket] Detecting named pipe
> Message-ID: <50435E51.1000208 at matos-sorge.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed

> Hi,

> I am trying to obtain the md5sum of a bunch of files, so for all files 
> with path 'p' I do : (call-with-input-file p md5)

> The problem is that this hangs when I find a named pipe file. 
> file-exists? returns #t and then the process hangs. It seems I can't run 
> md5 on named pipes, so how can I check if a file is a named pipe?

> Cheers,
> -- 
> PMatos



> End of users Digest, Vol 85, Issue 3
> ************************************
Hi,

named pipes have a file-size of zero. So you may detect named pipes by checking 
the file size of each file.

Greetings from Hamburg, Germany
Axel Schnell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120902/e8b3669c/attachment.html>

Posted on the users mailing list.