mailing list of musl libc
 help / color / mirror / code / Atom feed
* procfs stdio writev problem
@ 2013-05-05  9:16 Jens
  2013-05-05 10:01 ` Justin Cormack
  0 siblings, 1 reply; 5+ messages in thread
From: Jens @ 2013-05-05  9:16 UTC (permalink / raw)
  To: musl


Hello!

I've noticed a problem when using bash linked with musl.

laas:~# echo 60 > /proc/sys/kernel/panic
-su: echo: write error: Invalid argument

laas:~# cat t.sh
#!/bin/bash
echo 60 > /proc/sys/kernel/panic

laas:~# strace -f t.sh
...
writev(1, [{"60", 2}, {"\n", 1}], 2)    = 2
writev(1, [{"", 0}, {"\n", 1}], 2)      = -1 EINVAL (Invalid argument)

I'm guessing that musl uses writev in its stdio implementation.

And I think the error is due to a simplistic implementation in procfs, 
that parses each write on its own, and that the writev is split into 
several writes.

This is with linux kernel 3.6.0 btw.

I have no idea if something can and should be done about this, but likely 
somebody else will run into the same problem.

Regards,
Jens



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

end of thread, other threads:[~2013-05-11  3:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-05  9:16 procfs stdio writev problem Jens
2013-05-05 10:01 ` Justin Cormack
2013-05-05 18:49   ` Jens
2013-05-05 19:03     ` Rich Felker
2013-05-11  3:49     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).