From: Johannes Sixt Date: Mon, 03 Sep 2012 18:15:55 GMT Subject: Re: [PATCH 1/2] Support for setitimer() on platforms lacking it Message-ID: <5044F3DB.9060908@kdbg.org> In-Reply-To: <000d01cd89b6$d5ba6c30$812f4490$@schmitz-digital.de> Am 03.09.2012 11:31, schrieb Joachim Schmitz: > > Hmm, I see that there the errors are handled differently, like this: > > if (ovalue != NULL) > return errno = EINVAL, > error("setitimer param 3 != NULL not implemented"); > > Should this be done in my setitimer() too? Or rather be left to the caller? > I tend to the later. The error message is really just a reminder that the implementation is not complete. Writing it here has the advantage that it is much more accurate than a generic "invalid argument" or "operation not supported" error that the caller would be able to write. -- Hannes