[lsb-discuss] ioctl in LSB

Wichmann, Mats D mats.d.wichmann at intel.com
Wed Jan 13 06:22:38 PST 2010


Tobias Evert XT wrote:
> Hello
> 
> We have a software product that uses Poco (http://pocoproject.org/).
> In our efforts to make our product LSB compliant we have tried to
> build Poco with an LSB compiler. We have run into some trouble with
> ioctl, Poco calls ioctl() with the FIONBIO constant which is not
> included in LSB.
> 
> Why is this constant not included? From the documentation about ioctl
> it seems that the LSB have a limited and carefully selected set of
> command options for the ioctl-command, so I guess there is a reason
> for the exclusion of FIONBIO. Is there an alternative way of
> achieving the same thing that is available to LSB compliant
> applications? From what I can find, using fcntl() with O_NONBLOCK
> should work, since this is a POSIX command I guess it is available in
> LSB? 


I'm not sure how true it is in general, but there used to be
concerns about how "portable" FIONBIO was; and ioctl in general
is not very portable as many of the commands are device-specific
and so on.  fcntl (... O_NONBLOCK ...) is generally considered a
safe and standards-compliant alternative, so I'd say it's certainly
worth a try, indeed it's both POSIX and properly supported in LSB.





More information about the lsb-discuss mailing list