search for: tcsanow

Displaying 20 results from an estimated 34 matches for "tcsanow".

2008 May 26
4
xvm-gate: arrow keys broken in pygrub
...a TCSAFLUSH ioctl to set the new terminal attributes, but that apparently flushes queued data (the" ESC [ ? 1 h" vt100 init sequence for switching to application mode) that is already waiting in the pty''s output queue. Why doesn''t xen.hg/tools/console/client/main.c use TCSANOW when configuring terminal attributes? That wouldn''t flush queued data, and with such a change the arrow keys start working for me inside pygrub. diff --git a/tools/console/client/main.c b/tools/console/client/main.c --- a/tools/console/client/main.c +++ b/tools/console/client/main.c @@ -1...
2001 Oct 18
0
Patch for hanging ssh-add under Solaris CDE
..._FLUSH (TCSAFLUSH|TCSASOFT) -#else -# define _T_FLUSH (TCSAFLUSH) -#endif - char * readpassphrase(prompt, buf, bufsiz, flags) const char *prompt; @@ -102,13 +96,13 @@ term.c_cc[VSTATUS] = _POSIX_VDISABLE; } #endif - (void)tcsetattr(input, _T_FLUSH, &term); + (void)tcsetattr(input, TCSANOW, &term); } if (!(flags & RPP_ECHO_ON)) { if (tcgetattr(input, &term) == 0 && (term.c_lflag & ECHO)) { echo = 1; term.c_lflag &= ~ECHO; - (void)tcsetattr(input, _T_FLUSH, &term); + (void)tcsetattr(input, TCSANOW, &term); } } @@ -141,7 +13...
2019 Jan 25
0
[klibc:update-dash] input: Remove HETIO
...istory *p; - struct history *n; -}; - - -void input_delete (int); -void input_home (int *); -void input_end (int *, int); -void input_backspace (int *, int *); - - - -void hetio_init(void) -{ - hetio_inter = 1; -} - - -void hetio_reset_term(void) -{ - if (reset_term) - tcsetattr(1, TCSANOW, &old_term); -} - - -void setIO(struct termios *new, struct termios *old) /* Set terminal IO to canonical mode, and save old term settings. */ -{ - tcgetattr(0, old); - memcpy(new, old, sizeof(*new)); - new->c_cc[VMIN] = 1; - new->c_cc[VTIME] = 0; - new->c_lflag &= ~ICANON; /* unbu...
2020 Mar 28
0
[klibc:update-dash] dash: input: Remove HETIO
...istory *p; - struct history *n; -}; - - -void input_delete (int); -void input_home (int *); -void input_end (int *, int); -void input_backspace (int *, int *); - - - -void hetio_init(void) -{ - hetio_inter = 1; -} - - -void hetio_reset_term(void) -{ - if (reset_term) - tcsetattr(1, TCSANOW, &old_term); -} - - -void setIO(struct termios *new, struct termios *old) /* Set terminal IO to canonical mode, and save old term settings. */ -{ - tcgetattr(0, old); - memcpy(new, old, sizeof(*new)); - new->c_cc[VMIN] = 1; - new->c_cc[VTIME] = 0; - new->c_lflag &= ~ICANON; /* unbu...
2008 Mar 26
3
[PATCH][TOOLS] pygrub: cleanup and support for NetBSD
Hi Keir, Attached patch gets rid of the global attr variable and adds support for NetBSD. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht
2011 Apr 13
1
Fwd: Re: Asterisk as a Condo door opener/intercom
...EV, O_RDWR | O_NDELAY))< 0) { fprintf(stderr, "lpswtich: %s: %d\n", SWDEV, strerror(errno)); exit(1);} cfmakeraw(&port_config ); port_config.c_iflag=port_config.c_iflag|IXON; port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS; tcsetattr( fd, TCSANOW,&port_config ); ioctl(fd, TIOCMSET,&set_bits ); /* wait for printer to warm up */ sleep(45); /* not say "ready" and release the printer */ set_bits = 6; cfmakeraw(&port_config ); port_config.c_iflag=port_config.c_iflag|IXON; port_conf...
2002 May 09
4
make distprep broken?
Hello All, Doing a make distprep doesn't seem to work anymore: $ make -f Makefile.in distprep make: @SH@: Command not found make: *** [catman-do] Error 127 I've seen this on AIX & Redhat (gnu make) and Solaris (native make). I suspect this occurs on most platforms. Is this still the recommended way of autoreconf'ing CVS releases for building? -Daz.
2001 Mar 30
4
linux tcsetattr failed
does anyone else see this on linux: localhost sshd[14418]: Accepted password for stevesk from 15.126.45.158 port 49594 localhost sshd[14418]: Setting tty modes failed: Invalid argument redhat with kernel 2.2.17. ttymodes.c: /* Set the new modes for the terminal. */ if (tcsetattr(fd, TCSANOW, &tio) < 0) log("Setting tty modes failed: %.100s", strerror(errno)); return;
2006 Jun 16
5
[PATCH][XM-TEST] Fix bugzilla # 674 by changing the xm-test Console.py to wait for the command prompt.
Lots of xm-test tests are failing with console timeouts on some machines at the moment. I reproduced the problem and found it was due to some probing activity in the boot process of the -xen kernel. The behaviour of the current xm-test code is to assume that the boot process has finished after performing three one-second waits for input---when the probing activity introduces more than three
2005 Oct 10
2
[Bug 1101] terminal allocation hangs ssh at a blocking tcsetattr (-t option)
..."ssh -qtt remote.mine.nu pppd 192.168.10.1:192.168.10.2" The ssh process which is run as a child will try as a consequence of option -t will hang for ever in function enter_raw_mode / tcsetattr(fileno(stdin), TCSADRAIN, &tio) . I could avoid the problem with replacing TCSADRAIN with TCSANOW, not sure though what a proper fix would be for this. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
2002 Jun 21
0
[Bug 282] New: ttymodes sent can be invalid
...I'm not sure how to resolve this, or if this is a major problem, but it appears that since the mode settings failed, perhaps something ssh needed might not be set, or might be set wrong. I added a log message: /* Set the new modes for the terminal. */ if (tcsetattr(fd, TCSANOW, &tio) == -1) { log("Setting tty modes failed: %.100s", strerror(errno)); log("failed..: %d, %d, %d, %d, %d", fd, tio.c_iflag, tio.c_oflag, tio.c_cflag, tio.c_lflag); } And notice that the system logged t...
2001 Nov 27
2
3.0.1p1 losing tty modes?
...f USE_VHANGUP old = mysignal(SIGHUP, SIG_IGN); + tcgetattr(*ttyfd,&tio); vhangup(); mysignal(SIGHUP, old); #endif /* USE_VHANGUP */ @@ -320,6 +322,7 @@ #ifdef USE_VHANGUP close(*ttyfd); *ttyfd = fd; + tcsetattr(*ttyfd,TCSANOW,&tio); #else /* USE_VHANGUP */ close(fd); #endif /* USE_VHANGUP */ I am not subscribed to the list, so please cc: to me. Michael
2005 Feb 20
0
Re: Asterisk-Users Digest, Vol 7, Issue 260
..._RDWR | O_NDELAY)) < 0) { fprintf(stderr, "lpswtich: %s: %s\n", SWDEV, sys_errlist[errno]); exit(1);} cfmakeraw( &port_config ); port_config.c_iflag=port_config.c_iflag|IXON; port_config.c_oflag=port_config.c_oflag|CLOCAL|~CRTSCTS; tcsetattr( fd, TCSANOW, &port_config ); ioctl(fd, TIOCMSET, &set_bits ); sleep(5); close(fd); } /* lpswitch.h * include file for lpswitchd configuration * (c) 1994, David Cook <davidc@advan.ca> */ #include<termios.h> #define FILTERDEUG 0 /* filter app debug */ #define DAEMO...
2008 Nov 25
1
sio vs uart vs ucomm problems / differences
...OCRNL | OXTABS | ONOEOT | ONOCR | ONLRET); t.c_cflag &= ~(CSIZE | CSTOPB | PARENB | CCTS_OFLOW | CRTS_IFLOW | CDTR_IFLOW | CDSR_OFLOW | CCAR_OFLOW); t.c_cflag |= (CS8); t.c_cc[VMIN] = 1; t.c_cc[VTIME] = 0; tcsetattr(dev->fd, TCSANOW, &t); val = fcntl(dev->fd, F_GETFL, 0); if (val >= 0) { fcntl(dev->fd, F_SETFL, val | O_NONBLOCK); } } else { tcflush(dev->fd, TCIOFLUSH); close(dev->fd); dev->fd =...
2002 Feb 12
1
SSH Client Hangs after logging in to SSHD
I'm not a ssh expert and I don't know if the log is good or bad, but I too am running OpenSHH under OpenServer. I find that after I connect, the return key has no effect unless I first type: stty sane <Ctrl>j If you've hit <ENTER> before that you must first press <Ctrl>j a couple of times to clean out the buffer. After I type the above command, everything
2009 Jan 26
1
ups emerson liebert GTX2 ESP-II serial protocol demo
...lag = IGNPAR | IGNBRK; newtio.c_oflag = 0; /* set input mode (non-canonical, no echo,...) */ newtio.c_lflag = 0; newtio.c_cc[VTIME] = 0; /* inter-character timer unused */ newtio.c_cc[VMIN] = 1; /* blocking read until 5 chars received */ tcflush(fd, TCIFLUSH); tcsetattr(fd,TCSANOW,&newtio); signal( SIGALRM, &sgnl_ignore ); while (1) { for (i=0;i<ncmd;i++) { //printf("\n***%d:[%03s c0:%03d C1:%03d] init:%03d type:%03d\n",i, c[i].descr,c[i].cmd[0],c[i].cmd[1],c[i].init,c[i].type); if (c[i].supported==0) { //read failed on 1st try, thus...
2017 Mar 03
5
[PATCH WIP 0/5] Fix virt-rescue.
This set of patches fixes virt-rescue rather cleanly. In particular the problems with handling ^C are completely fixed. Work still to be done before this can go upstream: - Shutdown doesn't work properly if you exit the shell. At the moment to exit you must do 'reboot -f'. Future improvements: - An escape sequence and escape commands that could be handled by virt-rescue,
2017 Mar 03
5
[PATCH 0/5] Fix virt-rescue.
This fixes the main issues in virt-rescue and is usable. There are some enhancements which could be made (in follow up work): - An escape sequence and escape commands that could be handled by virt-rescue, eg. to shut down the appliance, mount or unmount filesystems. - `virt-rescue -i' could be implemented cleanly by performing the right API calls before handing control to the
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...*irq = *res; + return res; +} + +static void trigger_irq(int fd, u32 irq) +{ + u32 buf[] = { LHREQ_IRQ, irq }; + if (write(fd, buf, sizeof(buf)) != 0) + err(1, "Triggering irq %i", irq); +} + +static struct termios orig_term; +static void restore_term(void) +{ + tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); +} + +struct console_abort +{ + int count; + struct timeval start; +}; + +/* We DMA input to buffer bound at start of console page. */ +static int handle_console_input(int fd, struct device *dev) +{ + u32 num, irq = 0, *lenp; + int len; + struct iovec iov[LGUEST_MAX_DMA_SECTIONS];...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...*irq = *res; + return res; +} + +static void trigger_irq(int fd, u32 irq) +{ + u32 buf[] = { LHREQ_IRQ, irq }; + if (write(fd, buf, sizeof(buf)) != 0) + err(1, "Triggering irq %i", irq); +} + +static struct termios orig_term; +static void restore_term(void) +{ + tcsetattr(STDIN_FILENO, TCSANOW, &orig_term); +} + +struct console_abort +{ + int count; + struct timeval start; +}; + +/* We DMA input to buffer bound at start of console page. */ +static int handle_console_input(int fd, struct device *dev) +{ + u32 num, irq = 0, *lenp; + int len; + struct iovec iov[LGUEST_MAX_DMA_SECTIONS];...