From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 10 Apr 2011 17:49:02 -0700 From: Anthony Martin To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20110411004902.GA13057@dinah> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [9fans] /dev/draw and c, rc, ruby, python, go Topicbox-Message-UUID: cebb69be-ead6-11e9-9d60-3106f5b1d025 Sergey Kish once said: > Today I've implemented same on go. It also falls but it may be my > fault > > error: read /dev/draw/new: unknown id for draw image You're giving bad data to devdraw. The Go code on the gist is sending long(id) 'n' long(id) byte(namelen) string(name) but that first long will cause the write to fail. Also, you should really check the errors from any system call instead of discarding them. The error from the read is a red herring in this case (but still expected because the named image allocation failed). Now for the Python and Ruby code, I really have no idea. I would check to see if their standard library requires that you flush after writes. Hope that helps. Anthony