David, below is a small patch which fixes a problem in ksh's io subsystem when a fd number is higher than 32k. I found this by accident when looking for other bugs. On Solaris and Linux at least up to 65535 fds are allowed per process but I can't rule out that other Unixes may allow more open files per process. The patch shifts the flag out of the lower 16bits of an int into the 2nd bit of the upper 16bit, allowing at least 65536*2 files to be opened ------------------------------------------------- diff -r -u src/cmd/ksh93/include/io.h src/cmd/ksh93/include/io.h --- src/cmd/ksh93/include/io.h 2012-04-09 22:05:58.000000000 +0200 +++ src/cmd/ksh93/include/io.h 2012-05-07 23:34:43.480838100 +0200 @@ -51,7 +51,7 @@ #define IOCLEX 0100 #define IOCLOSE (IOSEEK|IONOSEEK)
-#define IOSUBSHELL 0x8000 /* must be larger than any file descriptor */ +#define IOSUBSHELL 0x20000 /* must be larger than any file descriptor */ /* * The remainder of this file is only used when compiled with shell ------------------------------------------------- Irek _______________________________________________ ast-developers mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-developers
