[xmonad] Re: xmobar PipeReader doesn't work

Xie Hanjian jan.h.xie at gmail.com
Fri Mar 13 14:53:30 EDT 2009


Finally I got it works!

the cat > fifo problem fixed immediately after I upgrade to ghc 6.10.1
and recomplie xmobar.

but the PipeReader still stop working after read in the first line of data.
then I found this and patched the plugin:

http://www.haskell.org/haskellwiki/GHC:FAQ#When_I_open_a_FIFO_.28named_pipe.29_and_try_to_read_from_it.2C_I_get_EOF_immediately.

	diff -rN old-xmobar/Plugins/PipeReader.hs new-xmobar/Plugins/PipeReader.hs
	26c26
	<         h <- openFile p ReadMode
	---
	>         h <- openFile p ReadWriteMode

it works perfect now.

Thanks for all :)

Cheers,
Jan

* Brandon S. Allbery KF8NH <allbery at ece.cmu.edu> [2009-03-13 11:23:56 -0400]:

> On 2009 Mar 13, at 10:21, Norbert Zeh wrote:
>>>> 2) Create a pipe somewhere with "mkfifo foo" and edit your rc file  
>>>> to
>>>>   read this pipe instead.  Then fire up xmobar and in your terminal
>>>>   do "cat > fifo".  Then start typing lines and see whether they  
>>>> show
>>>>   up in xmobar.
>>>
>>> Interesting. This test doesn't work here. Platform dependent?
>>>
>>> (I'm using linux x86_64 and ghc 6.8.2)
>>
>> I'm also on x86_64 but am using ghc 6.8.3, and it works here.  What
>
>
> This is tickling a neuron; I have a vague recollection of such a bug in 
> 6.8.2.  Try upgrading.
>
> -- 
> brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
> system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
> electrical and computer engineering, carnegie mellon university    KF8NH
>
>



-- 
jan=callcc{|jan|jan};jan.call(jan)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090314/bf3324bc/attachment.bin


More information about the xmonad mailing list