Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!moxie!texbell!root From: root@texbell.sbc.com (Greg Hackney) Newsgroups: comp.sys.ncr Subject: Re: WIN/TCP - socket descriptor problem Message-ID: <484@texbell.sbc.com> Date: 14 Sep 90 16:21:10 GMT References: <483@texbell.sbc.com> Organization: Southwestern Bell Lines: 23 In article <483@texbell.sbc.com> tore%fdata.UUCP@nac.no (Tore Ingholm) writes: >I have a process allocating a Tcp/Ip socket and binding it to a well- >known port, then the program forks another process which makes an execl() >to overlay a new program. A call to accept() on the described socket in >the new process results in error: EOPNOTSUPP I have a program running on a 32/600 w/ WIN/TCP that works okay. Here's how it's set up: s = accept(tcp_socket, &addr, &addrlen); if (fork() == 0) { close(0); close(1); close(2); dup(s); dup(s); dup(s); close(tcp_socket); close(s); FUNCTION_THAT_EXECS(); exit(1); } -- Greg Hackney Southwestern Bell Telephone Co. root@texbell.sbc.com