From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,d8ae57d8837da4a0,start X-Google-Attributes: gid1164f8,public From: foo@bar.com (Anita Hegerlend) Subject: Digital Unix - rexec() problems Date: 1998/02/04 Message-ID: <34d844c3.11215802@personalnews.germany.eu.net>#1/1 X-Deja-AN: 321954988 Reply-To: foo@bar.com Organization: Bar Inc. Newsgroups: comp.sys.dec Hi, I'm writing a program that executes other programs on a number of machines in the net. For that purpose I use the rexec() call that reports a socket descriptor from that I can read the outputs of the remotely started program and close the descriptor afterwards. In case that a machine cannot be reached, e.g. is switched off, the respective socket descriptor "gets lost" because a -1 (and no descriptor) is reported in order to report a problem. The outputs of the function (which is called within a pthread) show, that a descriptor that could have been used for testing the existence of an unreacheable host is not used anymore. Because there are other parts of the software coming from other developers who can read and write files at any time I am not able to close a descriptor on suspect. The problem is critical because I loose about 1000 descriptors per day and UNIX has only about 4000 descriptors at most in stock for a process. This resolves in a crash every 4 days and the program is intended to run over weeks. Has anyone had this problem before? Are there any patches for that? An alternative would be to create a separate process but that results in lower performance but the system would clean up. Cheers Anita