9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Why isn't there a newline character after the first line of /dev/wsys/wctl?
@ 2010-01-15  1:21 Andrés
  2010-01-15  2:54 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: Andrés @ 2010-01-15  1:21 UTC (permalink / raw)
  To: 9fans

rio(4) says:

wctl may be read. When read, it returns the location of the window as
four decimal integers formatted in the usual 12–character style: upper
left x and y, lower right x and y. Following these numbers are strings
describing the window's state: hidden  or visible; current or
notcurrent. A subsequent read will block until the window changes
size, location, or state.

I'm new to Plan 9, but isn't:

term% read /mnt/wsys/wctl

Supposed to just print the first line?, instead, it prints:

read: error reading /mnt/wsys/wctl: buffer too small

Several guys from #plan9 in Freenode told me that that was happening
because of a missing newline.

olegfink told me how to work around this, with:
dd -count 1 -quiet 1 -if /mnt/wsys/wctl

But, is the current behavior correct? Or is it erroneous?

Greetings.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-15  2:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15  1:21 [9fans] Why isn't there a newline character after the first line of /dev/wsys/wctl? Andrés
2010-01-15  2:54 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).