Sponsored Content
Top Forums Programming Huge difference between _POSIX_OPEN_MAX and sysconf(_SC_OPEN_MAX). Post 302400241 by jim mcnamara on Tuesday 2nd of March 2010 05:35:56 PM
Old 03-02-2010
You have to set your #define statements to invoke what you want.
Possible examples:
Code:
#define _POSIX_C_SOURCE
#define _POSIX_SOURCE
#define _XOPEN_SOURCE 600
.........

You cannot invoke all these all at once. You really need to read up on your compiler, then REALLY read /usr/limits.h very carefully. Take notes.

On the forums, follow the standards link here, download the big ol' pdf.
UNIX IEEE Std 1003.1-2001 (POSIX.1) - The UNIX and Linux Forums

There are updates to this - I think they still show up in that link.
 

9 More Discussions You Might Find Interesting

1. Solaris

Huge PI in vmstat

This is something nowbody around me can explain: vmstat (-S 5) shows a huge number of PI but when I try to monitor it in parallel with iostat - there is no IO activity to be seen that would correspond to this. I have 16G RAM and 32G swap file. I'll really appreciate if somebody can explain it.... (9 Replies)
Discussion started by: dkvent
9 Replies

2. UNIX for Dummies Questions & Answers

Difference between two huge files

Hi, As per my requirement, I need to take difference between two big files(around 6.5 GB) and get the difference to a output file without any line numbers or '<' or '>' in front of each new line. As DIFF command wont work for big files, i tried to use BDIFF instead. I am getting incorrect... (13 Replies)
Discussion started by: pyaranoid
13 Replies

3. Ubuntu

kernel-huge

Hi All, I have a uname -a Linux caws101arop 2.6.9-67.0.20.ELsmp #1 SMP Wed Jun 18 12:35:02 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux And I'm having lots of problem especially when the web server got new two additional website. Before the memory was just 12G but we upgraded it to 65G. Do... (1 Reply)
Discussion started by: itik
1 Replies

4. AIX

Huge difference in reported Disk usage between ls,df and du

IBM RS6000 F50 AIX 4.3.2 i am having trouble in calculating the actual size of a set of directories and reconciling the results with the actual Hard Disk space used I have 33GB disk which is showing 7.8GB used, a byte count of the files in the directory/sub-dirs i`m interested in is 48GB,... (4 Replies)
Discussion started by: cooperuf
4 Replies

5. Shell Programming and Scripting

Three Difference File Huge Data Comparison Problem.

I got three different file: Part of File 1 ARTPHDFGAA . . Part of File 2 ARTGHHYESA . . Part of File 3 ARTPOLYWEA . . (4 Replies)
Discussion started by: patrick87
4 Replies

6. Programming

what is the main difference between difference between using nonatomic lseek and O_APPEND

I think both write at the end of the file ...... but is there a sharp difference between those 2 instruction ..... thank you this is my 3rd question today forgive me :D (1 Reply)
Discussion started by: fwrlfo
1 Replies

7. Shell Programming and Scripting

Difference between two huge .csv files

Hi all, I need help on getting difference between 2 .csv files. I have 2 large . csv files which has equal number of columns. I nned to compare them and get output in new file which will have difference olny. E.g. File1.csv Name, Date, age,number Sakshi, 16-12-2011, 22, 56 Akash,... (10 Replies)
Discussion started by: Dimple
10 Replies

8. UNIX for Dummies Questions & Answers

Shc script size limitation and "_SC_ARG_MAX (see sysconf(2))" parameter

I wish to change the parameter (which I do not understand exactly what it is and I wish to) and be able to use shc with very long bash scripts (2 Replies)
Discussion started by: frad
2 Replies

9. Shell Programming and Scripting

awk to calculate difference of split and sum the difference

In the awk I am trying to subtract the difference $3-$2 of each matching $4 before the first _ (underscore) and print that value in $13. I think the awk will do that, but added comments. What I am not sure off is how to add a line or lines that will add sum each matching $13 value and put it in... (2 Replies)
Discussion started by: cmccabe
2 Replies
GETDTABLESIZE(3)					     Linux Programmer's Manual						  GETDTABLESIZE(3)

NAME
getdtablesize - get descriptor table size SYNOPSIS
#include <unistd.h> int getdtablesize(void); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getdtablesize(): Since glibc 2.12: _BSD_SOURCE || !(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) Before glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED DESCRIPTION
getdtablesize() returns the maximum number of files a process can have open, one more than the largest possible value for a file descrip- tor. RETURN VALUE
The current limit on the number of open files per process. ERRORS
On Linux, getdtablesize() can return any of the errors described for getrlimit(2); see NOTES below. ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +----------------+---------------+---------+ |Interface | Attribute | Value | +----------------+---------------+---------+ |getdtablesize() | Thread safety | MT-Safe | +----------------+---------------+---------+ CONFORMING TO
SVr4, 4.4BSD (the getdtablesize() function first appeared in 4.2BSD). It is not specified in POSIX.1-2001; portable applications should employ sysconf(_SC_OPEN_MAX) instead of this call. NOTES
getdtablesize() is implemented as a libc library function. The glibc version calls getrlimit(2) and returns the current RLIMIT_NOFILE limit, or OPEN_MAX when that fails. SEE ALSO
close(2), dup(2), getrlimit(2), open(2) Linux 2015-03-02 GETDTABLESIZE(3)
All times are GMT -4. The time now is 05:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy