11-13-2002
Your limit will depend on how many fd's you can have open at once.
By default, those macros are setup to handle onle 2048 fd's. If you need more fd's than than, then you must define FD_SETSIZE to be the number that you need. Put this "define" above the the "include" which is bringing in the FD macros. That include file will see your definition and will respect it.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a UNIX daemon process that's been started by a parent process, an application server.
The behavior of this daemon process is to inherit and use the app
server's file descriptors (ports/sockets).
When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies
2. Shell Programming and Scripting
Hello all,
I'm developing a deployment script at work and at one point it would need to display something like this:
Which version of ADMIN would you like to deploy?
1) 1.0.0 (store1, 10 Jan 2004)
2) 1.0.1 (store1, 20 Jun 2004)
3) 1.0.2 (store1, 15 Jul 2004)
Select a version :
I know... (5 Replies)
Discussion started by: domivv
5 Replies
3. UNIX for Dummies Questions & Answers
How do I create a script that provides a count of distinct values of a particular field in a file utilizing commonly available UNIX commands (sh or awk)?
Field1|Field2|Field3|Field4
AAA|BBB|CCC|DDD
111|222|333|777
AAA|EEE|ZZZ|EEE
111|555|333|444
AAA|EEE|CCC|DDD
111|222|555|444
For... (2 Replies)
Discussion started by: Refresher
2 Replies
4. Shell Programming and Scripting
PS3="Enter corresponding number and hit enter:"
select DIR in `cat mylist` QUIT
do
if
then
echo "INVALID INPUT"
else
if ; then
my commands .....
else
break
fi
fi
REPLY=''
done
The above will return something like below :
Select from the list of... (4 Replies)
Discussion started by: ningy
4 Replies
5. Shell Programming and Scripting
hi,
i have a requirement where i need to connect sqlplus from unix and i am able to do so by following command:
cust_count=`sqlplus -s $ORACLE_USER/$ORACLE_PASS@$ORACLE_SID << EOF
set pagesize 0
set feedback off
set verify off
... (1 Reply)
Discussion started by: lovelysethii
1 Replies
6. Shell Programming and Scripting
I copied the below program to play around with displaying a list of items using the select command in ksh. When I put all items in the same line, it works fine. I am trying to use multiple lines instead of a single row...my list is too large for a single line. How do I get the line continuation... (3 Replies)
Discussion started by: haganator
3 Replies
7. Shell Programming and Scripting
I have about 6000 files of the following format (three simplified examples shown; actual files have variable numbers of columns, but the same number of lines). I would like to concatenate the ID (*Loc*) and data lines, but not the others, as shown below. The result would be one large file (or... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
8. Shell Programming and Scripting
I have a text file in this format
Some lines....
Question no: 1
The question?
A. Answer 1
B. Answer 2
C. Answer 3
D. Answer 4
Answer:B
Some lines....
Question no: 2
The question? (choose 2) (10 Replies)
Discussion started by: zorrox
10 Replies
9. Shell Programming and Scripting
Hi Friends,
$ cat test1.txt
emeka:1438
shelley:1439
dmeyer:1440
kurtarn:1441
abdul:1442
$ cat test2.txt
1:a
2:b
3:c
4:d
$ cat test3.txt
cat:dog:bat
man:hot:cold (5 Replies)
Discussion started by: Jewel
5 Replies
10. Shell Programming and Scripting
I am trying to have the user select two files from a numbered list which will eventually be turned into a variable then combined. This is probably something simple and stupid that I am doing.
clear
echo "Please Select the Show interface status file"
select FILE1 in *;
echo "Please Select the... (3 Replies)
Discussion started by: dis0wned
3 Replies
LEARN ABOUT OPENDARWIN
types
TYPES(5) BSD File Formats Manual TYPES(5)
NAME
types -- system data types
SYNOPSIS
#include <sys/types.h>
DESCRIPTION
The file sys/types.h contains the defined data types used in the kernel (most are used through out the system).
#ifndef _TYPES_H_
#define _TYPES_H_
typedef short dev_t;
#ifndef _POSIX_SOURCE
/* major part of a device */
#define major(x) ((int)(((unsigned)(x)>>8)&0377))
/* minor part of a device */
#define minor(x) ((int)((x)&0377))
/* make a device number */
#define makedev(x,y) ((dev_t)(((x)<<8) | (y)))
#endif
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short ushort; /* Sys V compatibility */
#include <machine/ansi.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
#include <machine/types.h>
#endif
#ifdef _CLOCK_T_
typedef _CLOCK_T_ clock_t;
#undef _CLOCK_T_
#endif
#ifdef _SIZE_T_
typedef _SIZE_T_ size_t;
#undef _SIZE_T_
#endif
#ifdef _TIME_T_
typedef _TIME_T_ time_t;
#undef _TIME_T_
#endif
#ifndef _POSIX_SOURCE
typedef struct _uquad { unsigned long val[2]; } u_quad;
typedef struct _quad { long val[2]; } quad;
#endif
typedef long * qaddr_t; /* should be typedef quad * qaddr_t; */
typedef long daddr_t;
typedef char * caddr_t;
typedef u_long ino_t;
typedef long swblk_t;
typedef long segsz_t;
typedef long off_t;
typedef u_short uid_t;
typedef u_short gid_t;
typedef short pid_t;
typedef u_short nlink_t;
typedef u_short mode_t;
typedef u_long fixpt_t;
#ifndef _POSIX_SOURCE
#define NBBY 8 /* number of bits in a byte */
/*
* Select uses bit masks of file descriptors in longs. These macros
* manipulate such bit fields (the filesystem macros use chars).
* FD_SETSIZE may be defined by the user, but the default here should
* be >= NOFILE (param.h).
*/
#ifndef FD_SETSIZE
#define FD_SETSIZE 1024
#endif
typedef long fd_mask;
#define NFDBITS (sizeof(fd_mask) * NBBY) /* bits per mask */
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#endif
typedef struct fd_set {
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} fd_set;
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
#endif /* !_POSIX_SOURCE */
#endif /* !_TYPES_H_ */
SEE ALSO
fs(5), time(3), lseek(2), adb(1)
HISTORY
A types file appeared in Version 7 AT&T UNIX.
Darwin AUGUST 2, 2001 Darwin