|
Date: Sun, 5 May 2013 11:16:55 +0200 (CEST) From: Jens <jensl@...s.mine.nu> To: musl@...ts.openwall.com Subject: procfs stdio writev problem 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.