coltoff@PRC.Unisys.COM (Joel Coltoff) (11/22/88)
I have an application that needs a server. Most of the code works fine on our Suns and 4.3bsd VAX. I'm in the process of porting this to a System V.3 version of UNIX running on an Arix nee Arete. The first question has to do with disassociating from the controlling tty. On the Sun/VAX version I do the following. i = open("/dev/tty", O_RDWR); if (i >= 0) { if ( ioctl(i, TIOCNOTTY, (char *)0) == -1 ){ perror( "ioctl:" ); } (void) close(i); } I can't find anyway to do this on the Arix. How does V.3 deal with this issue? The second question deals with sockets. The server sets up a socket to communicate with the application and then forks and execs. I don't want to dup() any descriptors. In some cases we need to have stdin, stdout and stderr available for debugging purposes. When this happens a window is open on the Sun and we directly access the applcation through it. Where the problem arises is getting the application to know which file descriptor to use for the socket. Is there a clever way to do this? If I do a stat on all open descriptors I don't see one that is marked as a socket. Any pointers on this would be greatly appreciated. Thanks in advance. -- - Joel {psuvax1,sdcrdcf}!burdvax!coltoff (UUCP) coltoff@burdvax.prc.unisys.com (ARPA)
ekrell@hector.UUCP (Eduardo Krell) (11/22/88)
In article <8387@burdvax.PRC.Unisys.COM> coltoff@PRC.Unisys.COM (Joel Coltoff) writes: >The first question has to do with disassociating from the controlling tty. >On the Sun/VAX version I do the following. ... >I can't find anyway to do this on the Arix. How does V.3 deal with this >issue? You use setpgrp(). Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com
guy@auspex.UUCP (Guy Harris) (11/23/88)
>The first question has to do with disassociating from the controlling tty. >On the Sun/VAX version I do the following. ... >I can't find anyway to do this on the Arix. How does V.3 deal with this >issue? Try "setpgrp()".