Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!sdd.hp.com!caen!msuinfo!netnews.upenn.edu!netnews.noc.drexel.edu!coe.drexel.edu!micro18 From: micro18@cbis.ece.drexel.edu (A TechnoDiscordian) Newsgroups: comp.os.386bsd.questions Subject: trying to get MacLayers running on NetBSD Message-ID: <1993Jul24.222832.9325@cbis.ece.drexel.edu> Date: 24 Jul 93 22:28:32 GMT Organization: Drexel University, College of Engineering, Philadelphia, PA Lines: 47 As the title says, I'm trying to get MacLayers running under NetBSD. (for those who don't know, maclayers is a two part system for multi-window logins over 1 serial line. It consists of a special communications program for the mac, and some code on the unix side to handle running several ptys over the one serial line.) Anyway, I compiled MacLayers unix side (I used the makefile's setting 'oldsun' which it says is good for BSD systems) got only one Warning (a simple argument type mismatch on a pointer argument - not a problem) and ran it. It actually runs (and much of it works) but during it's setup of the ptys it does the following: mypid = getpid (); (void) setpgrp (0, mypid); ioctl (DevTty, TIOCNOTTY, (char *)0); if ((tf = open (TtyName, O_RDWR)) == -1) { SendErrorMsg ("Cannot open %s: %s", TtyName, sys_errlist[errno]); exit (EXITABNORMAL); } DO DEBUG("Now in new process\n"); fflush(stdout); fflush(stderr); (void) dup2 (tf, 0); (void) dup2 (tf, 1); (void) dup2 (tf, 2); for (f = getdtablesize () - 1; f > 2; f--) close (f); {/* MHK */ int retcode;/* MHK */ retcode = ioctl (0, TIOCSPGRP, &mypid); DO DEBUG("ioctl 0,TIOCSPGRP retcode: %d\n",retcode);/* MHK */ if (retcode < 0) DO DEBUG("ioctl 0,TIOCSPGRP errno: %s\n",strerror(errno));/* MHK */ } The point of failure is when the ioctl (0, TIOCSPGRP, &mypid) is done. That call returns -1, and leaves me logged into a pty where even 'more' can't run because it can't make ioctl calls correctly. Any ideas as to which manual to look in, or reasons as to why this doesn't work, I'd love to hear. I currently can't really use layers correctly until this problem is fixed. Any help will be greatly appreciated. Michael Kohne House of the Techno-Discordians, Automotive Amusements Division <VROOOOOOOM>