The Linux Foundation

 

Become an Individual Member

Talk:PosixConflicts

From The Linux Foundation

Contents

Comments on this Page

Add comments here.

POSIX Similarities

Just in case people get the impression that the LSB is substantially at odds with POSIX, there are some 920 C language interfaces that are fully POSIX aligned (and several others that have 100% confoming extensions), and 69 commands that are fully aligned (plus a number of others with extensions).


Diff Elimination Progress

Errnos

ENXIO v ENODEV
Older Linux kernels (2.2) returned ENODEV for opening a non-existent special file; 2.4 and 2.6 kernels return ENXIO as defined in POSIX. Therefore this difference can now be eliminated (all conforming systems have moved on from 2.2). LSB 3.0 will not include this difference.
ENOTSUP v EOPNOTSUPP
A defect against POISX has been filed. It is unlikely that this difference will be resolved in a techncal corrigendum, but if POSIX can make a statement of direction that allows both these symbols to have the same value, this would remove that difference.
EISDIR v EPERM
This is from unlink, and POSIX requires EPERM (line 49174), while the linux kernel (fs/namei.c, sys_unlink) returns EISDIR. This is a case where the implementation prohibits using unlink() on a directory.

Two possibilitities here ... a. submit a glibc patch so that if the syscall fails with errno set to EPERM, then, if POSIXLY_CORRECT is set in the environment, stat the file (which hasn't been removed) and, if it was a directory, change the errno to EPERM.

b. change to POSIX to allow either behavior (cf line 49177 which permits [EPERM] or [EACCES])

Awaiting outcome of ENOTSUP v EOPNOTSUPP to see if this second alternative worth trying!

Substantial Interface differences

Originally this applied to fcntl, kill and strerror_r. To this, add the *scanf family of functions (the %s, %S and %[ coversion specifiers may take a length modifier 'a' ... conflicts with ISO C hex float in the conext of scanf("%aseconds", ...). Also adding link to this list. Some cleanup has been done to fcntl to highlight that the O_LARGEFILE flag can only get set in conditions where it makes sense to set it.

LSB Extensions

These are not conflicts, although listed as such. Includes waitpid, ioctl, bc, ipcrm and od. LSB 3.0 will list these as extensions.


LSB Issues

opterr, optind, and optopt do not differ from POSIX ... remove these diffs.

at, batch, crontab: calrify that it is an option (XSI shaded text) that is being altered. Possibly consider suggesting that POSIX makes the file locations for the .allow and .deny files implementation defined.

df: add that the XSI optional -t option has unspecified results in LSB. Clarify the use of a special file as an argument. A defect on POSIX has been filed for this last case.

chgrp, chown: these diffs were fixed in a version of coreutils now being shipped by all conforming systems. They will not be listed as differing in LSB 3.0

cut:

echo: cleaned up text to clarify the LSB restrictions

renice:

more:

newgrp:

xargs: note that -E, -I and -L have now been added to a version of findutils. However, this version is not yet in widespread use. Updated the note to say that a future version of LSB will require -E, -I and -L.

file:

fuser:

ipcs: clarify the differences ... ipcs is XSI, and the GNU implemetnation is some way away from conforming.

ls: only extensions (-l and -p) behavior; the I18N comment referred to an option not specified in the LSB (the -I option), and so will be removed for LSB 3.0.

Internationalization

New find diffs added to LSB 3.0


[Article] [Discussion] [View source] [History]