On 4 December 2009 c. 11:44:00 Vladimir Kirillov wrote: > On 09:34 Fri 04 Dec, Otto Moerbeek wrote: > > > The main problem with this code is that ENOTTY is the wrong errno > > > to return. ENOTTY has a very specific meaning. > > > > It's hard to pick the right one. ESRCH seems close, but is for the > > reverse situation (you're requesting info for a pid taht does not > > exist). How about ECHILD? > > Maybe also ENOTCONN (as when no pid is available -- tunnel is not > connected), > or EPROCUNAVAIL/EPROGUNAVAIL (the name suits, but the intro(2) > description doesn't).
Maybe do not return error at all, just zero? -- Best wishes, Vadim Zhukov A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?