From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3edc674b8261869c,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1995-02-08 13:57:56 PST Newsgroups: comp.unix.osf.osf1 Path: nntp.gmd.de!dearn! esoc!linuxed1!peernews.demon.co.uk!btnet!bt!pipex!howland.reston.ans.net!ix.netcom.com!netcom.com!dgm From: dgm@netcom.com (Darshan Maharana) Subject: SIGIO on OSF/1 Message-ID: Organization: NETCOM On-line Communication Services (408 261-4700 guest) X-Newsreader: TIN [version 1.2 PL1] Date: Wed, 8 Feb 1995 21:57:56 GMT Hi netters , I am porting an application from Ultrix to DEC OSF/1. This application involves two machines (in this case two DEC AXP OSF/1, one running V2.0 and other V3.0) talking on async device. Lets call them Primary and Standby. Their role is interchangable. When Primary process wants to query the status of Standby it sends a single character on async device /dev/tty00. This device is physically connected to /dev/tty00 of Standby. Processes on both machines executes following code to enable themselves to receive SIGIO: ............................................. if(fork() != 0) exit(0); ............................................. /* create a new session, make the calling process, a session leader and a process group leader */ setsid(); ............................................. fd = open("/dev/tty00", O_RDWR); /* open device */ ioctl(fd, TIOCSCTTY, 0); /* Set the device as controlling terminal */ ioctl(fd, TIOCGETP, &tty_mode); /* get parameters */ tty_mode.sg_flags |= RAW; /* no processing of chars */ tty_mode.sg_flags &= ~ECHO; /* no echo of chars */ ioctl(fd, TIOCSETP, &tty_mode) != ERR) /* set parm */ ............................................. ...ioctl() /* set baud , char. length etc */. ............................................. fcntl(fd, F_SETOWN, getpid()); /* enable SIGIO signal to be delivered to the process */ Standby process reads incomming chars in SIGIO handler, and responds back on the same async device. The process on Primary reads that char again in SIGIO handler. NOW THE PROBLEM: I monitored SIGIO by putting diagnostics in signal handler. and found that process on OSf/1 V3.0 randomly looses SIGIO signal. Is it because I am using different versions (2.0 and 3.0) of OSF/1 on two sides ? Any help or pointer will be highly appreciated. Thanks for reading my posting with patience. Regards Darshan --