tore%fdata.UUCP@nac.no (Tore Ingholm) (09/14/90)
Hi, In order to port an existing Towernet communication package to a 32/700 with WIN/TCP using the socket interface, following problem occurs: 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, which according to the manual means: The referenced socket is not of type SOCK_STREAM. The problem occurs only in the Tcp/Ip version, not for Towernet. Is this a bug in WIN/TCP or is the socket descriptor not inherited by the new program after an execl() call, (file descriptors are, according to the manual), or do you have other suggestions? -- Tore Ingholm mail: mcsun!nuug!fdata!tore Fellesdata AS (or) tore%fdata.UUCP@nac.no Box 248 Skoeyen, tel: +47-2 ( 52-86-13 / 52-80-80 ) N-0212 OSLO 2, NORWAY fax: +47 2 52 85 10
root@texbell.sbc.com (Greg Hackney) (09/14/90)
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