Faking a Control Q from a device
Chip Rosenthal
chip at chinacat.Unicom.COM
Sat Sep 8 04:59:57 AEST 1990
In article <1120 at xroads.UUCP> willis at xroads.UUCP (Raymond Willis) writes:
>Is there a way to make the system think the plotter has sent a Control Q?
If you compile the following as "xon", you could then do, for
example, "xon /dev/tty2a" to unstick tty2a.
--- cut here -----------------------------------------------------------------
#include <stdio.h>
#include <fcntl.h>
#include <termio.h>
main(argc,argv)
int argc;
char *argv[];
{
int fd;
if ( argc != 2 ) {
fprintf(stderr,"usage: %s device\n",argv[0]);
exit(1);
}
if ( (fd=open(argv[1],O_RDONLY)) < 0 ) {
perror(argv[1]);
exit(1);
}
if ( ioctl(fd,TCXONC,1) != 0 ) {
perror(argv[1]);
exit(1);
}
close(fd);
exit(0);
}
--- cut here -----------------------------------------------------------------
--
Chip Rosenthal <chip at chinacat.Unicom.COM>
Unicom Systems Development, 512-482-8260
Our motto is: We never say, "But it works with DOS."
More information about the Comp.unix.xenix.sco
mailing list