ftp command is failing

hi

I am trying to execute ftp command from my process,but its fails with error

ftp: fdopen failed.

i came to know that fdopen fails if more than 256 files are open

now my process has more than 256 file descriptor open and they are necessary.

is there any other way ..please help

[322 byte] By [khan_069] at [2007-11-26 10:28:44]
# 1
Can't you raise the descriptor limit using ulimit or limit (depending on shell)? .7/M.
mAbrante at 2007-7-7 2:33:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
hithanks for replybut ulimit -n is already set to 65535i dont know whats relation between ftp and fdopendo u have any ideabye
khan_069 at 2007-7-7 2:33:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
No idea, do you get anything interesting if you run ftp from apptrace, and ask it to trace fdopen? e.g:apptrace -o apptrace.outputfile -v fdopen ftp <hostname> .7/M.
mAbrante at 2007-7-7 2:33:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4
Can you successfully exec an ftp to localhost? Problem may be on the destination system that you're trying to access -- not your system. Dean
djmurf at 2007-7-7 2:33:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5

There are significant limits on the stdio library for 32 bit executables.

I think they might be relaxed in newer versions of solaris 10, but I'm not sure.

Anyway you can either compile your program as a 64 bit executable or stop using stdio.

Use open, read etc directly instead of fopen, fprintf etc.

robertcohen at 2007-7-7 2:33:59 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...