bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix for fcntl() return value incompatibility on qnx (spec) versus linux


From: George Refseth
Subject: Fix for fcntl() return value incompatibility on qnx (spec) versus linux implementation expectation.
Date: Tue, 16 Dec 2003 00:01:09 +0100
User-agent: Opera M2/7.30 (QNX, build 3471)

The following patch while following the POSIX 1003.1 specification for the
use of
fcntl(fd, F_SETFD, 0x1) return value, works on Red Hat and Debian Linux, and
fixes
an incompatiblilty problem on QNX 6.2.1. There the return value when fcntl
returns
successfully are not defined to 0. Only not -1, in the case of F_SETFD.

http://www.qnx.com/developer/docs/momentics621_docs/neutrino/lib_ref/f/fcntl.html

$ cvs diff run.c
Index: run.c
===================================================================
RCS file: /cvsroot/ccvs/src/run.c,v
retrieving revision 1.38
diff -r1.38 run.c
442c442
<     if (fcntl (fd, F_SETFD, 1))
---
    if (fcntl (fd, F_SETFD, 1) == -1)

I hope this little fix could be drawn into the cvs source tree.
George Refseth
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]