/proc/self is not portable

Andrew Bartlett abartlet at samba.org
Thu Aug 9 00:48:45 UTC 2018


On Tue, 2018-08-07 at 09:24 -0500, Christopher O Cowan wrote:
> Andrew,
> 
> AIX does have the fd link under the pid, /proc/{pid}/fd. Just no "self" symlink.

OK, seems a sensible change then.

>  I don't have access to other platforms like Solaris (?) with /proc, but I seem to recall that the Linux /proc is a superset of the other platforms.
> 
> AIX 7 also has a filem, /proc/version and a directory, /proc/sys/ that contains sub-directories: adapter, aio, disk, fs, iodone, lvm, pcibux, and posix_aio. 
> I also found some references to /proc/sys/kernel in Samba source, that seems to be Linux specific. 
> 
> In another post, I will ask about flock() and AIX, because this opens a whole new can of worms. There is one instance of /proc/locks usage in lib/tdb/common/lock.c. I believe /proc/locks is unique to Linux (but I'm not sure about other platforms with a procfs.

This looks like debugging code that is not built, it is under an #if 0.

I hope this clarifies things,

Andrew Bartlett
-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list