search for: isatty

Displaying 20 results from an estimated 241 matches for "isatty".

2014 Jun 11
2
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
...port TIOCGPGRP, /dev/console doesn?t; using TCGETS here allows Linux booted with init=/bin/mksh-static to have working interactive command line (PS1, editing, etc). Reported-by: Dominik George <d.george at tarent.de> Signed-off-by: Thorsten Glaser <t.glaser at tarent.de> --- usr/klibc/isatty.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/klibc/isatty.c b/usr/klibc/isatty.c index c2e4a4e..2359479 100644 --- a/usr/klibc/isatty.c +++ b/usr/klibc/isatty.c @@ -8,8 +8,9 @@ int isatty(int fd) { - int dummy; + struct termios dummy; /* All ttys support TI...
2014 Jul 09
0
[klibc:master] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
...http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=7763dd33e5b8eed4b9e3c583c02c10176fd550d3 Author: Thorsten Glaser <tg at mirbsd.org> AuthorDate: Wed, 11 Jun 2014 10:02:14 +0200 Committer: H. Peter Anvin <hpa at zytor.com> CommitDate: Wed, 9 Jul 2014 08:21:02 -0700 [klibc] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does While all ?real? ttys may support TIOCGPGRP, /dev/console doesn?t; using TCGETS here allows Linux booted with init=/bin/mksh-static to have working interactive command line (PS1, editing, etc). [ hpa: TCGETS matches glibc, so go with it ] Re...
2014 Nov 25
3
[PATCH] mllib: use Unix.isatty
Make use of Unix.isatty instead of our TTY.isatty_stdout, as the supported OCaml provides the former already. --- mllib/common_utils.ml | 10 +++++----- mllib/progress.ml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 295981c..9fcd8dd 100644...
2014 Jun 11
0
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
...t; > using TCGETS here allows Linux booted with init=/bin/mksh-static > to have working interactive command line (PS1, editing, etc). > > Reported-by: Dominik George <d.george at tarent.de> > Signed-off-by: Thorsten Glaser <t.glaser at tarent.de> > --- > usr/klibc/isatty.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/usr/klibc/isatty.c b/usr/klibc/isatty.c > index c2e4a4e..2359479 100644 > --- a/usr/klibc/isatty.c > +++ b/usr/klibc/isatty.c > @@ -8,8 +8,9 @@ > > int isatty(int fd) > { > - int du...
2001 Jun 15
2
openssh 2.9p1: data loss when stdout sent to a pipe
...:51 2001 +++ openssh-2.9p1/clientloop.c Fri Jun 15 14:13:32 2001 @@ -787,12 +787,15 @@ if (!compat20) { /* enable nonblocking unless tty */ + /* REMOVED for now since it prevents ssh command output from + being reliably sent to a pipe. - PHS 2001/06/15 if (!isatty(fileno(stdin))) set_nonblock(fileno(stdin)); if (!isatty(fileno(stdout))) set_nonblock(fileno(stdout)); if (!isatty(fileno(stderr))) set_nonblock(fileno(stderr)); + */ max_fd = MAX(max_fd, fileno(stdin)); max_fd = MAX(max_fd, fileno(stdout)); max_fd = MAX(m...
2019 Aug 20
3
[8.0p1] After the remote ssh command execution, the session does not terminate until an active disconnect
...neric example because in our case, we are using an internal binary that I didn't want to make public. I thought it wouldn't matter, but apparently, it does. I am sorry I can't share more about this tool. BTW, our environment is based on FreeBSD, not on Linux. In our case, because "isatty" is set to 0, it never closes. ------ debug2: channel 0: output open -> closed debug2: channel 0: read<=0 rfd 8 len 0 debug2: channel 0: read failed debug2: channel 0: Fssh_chan_shutdown_read (i0 o3 sock -1 wfd 8 efd 10 [read]) debug2: channel 0: input open -> drain debug3: channel_h...
2014 Jun 11
2
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
I guess what I wanted to say is that it might be desirable to have the klibc shell do some dancing (perhaps controlled by some flags, but on by default?) If getpid() == 1 then fork a child, continue in the child, have the parent wait for the child to terminate, then exit child should setsid() close(2) close(1) close(0) open("/dev/ttyS0", O_RDONLY) open("/dev/ttyS0",
2014 Jun 12
0
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
...or hvc0 normally ? plus, if it fails you get a message and can retry). My point here, asking for this change, is: normally you do *not* need full job control right from the start. But you *do* want to have PS1 and working command line editing (e.g. tab completion). For this, /dev/console must be isatty(). bye, //mirabilos -- FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) --...
2019 Aug 20
2
[8.0p1] After the remote ssh command execution, the session does not terminate until an active disconnect
...able version of channels.c. --- /tmp/tmp.48415.39 2019-08-19 19:24:29.000000000 -0700 +++ crypto/openssh/channels.c 2019-08-19 19:19:39.000000000 -0700 @@ -2103,7 +2103,15 @@ channel_handle_efd_read(struct ssh *ssh, ssize_t len; int r, force; + force = c->detach_close; - force = c->isatty && c->detach_close && c->istate != CHAN_INPUT_CLOSED; if (c->efd == -1 || (!force && !FD_ISSET(c->efd, readset))) return 1; --- Thanks. Hong.
2007 Mar 23
7
4.6p1 chan_read_failed error
The 4.6p1 sshd is logging this error during remote commands or file transfers: error: channel 0: chan_read_failed for istate 3 Platform is Solaris 8, 4.6p1 + OpenSSL 0.9.8d. The commands and transfers work correctly, so the error message appears to be spurious. The error message does not appear when processing logins. Otherwise 4.6p1 is running without any apparent problems. This error
2002 Nov 25
0
Linux and Samba Code
...if ((pwentry = getpwuid(getuid())) == NULL) { fprintf(stderr, "Failed getting name entry for UID=%d, exiting...\n", getuid()); exit(1); } strncpy(name, pwentry->pw_name, STRLEN); } /* get a password and clean any cr/lf stuff */ if (isatty(0)) { /* interactive, so use a no-echo prompt twice */ fprintf(stderr, "Changing password for user '%s'\n", name); cp = getpass(PROMPT1); strncpy(newpw, cp, STRLEN); cp = getpass(PROMPT2); if (strcmp(newpw, cp)) { fprintf(stderr, "The two...
2014 Jun 11
0
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
Does ctrl+c work? My experience with (non klibc) init=/bin/bash is that getting ctrl+c to work requires some jumping through hoops, because running as pid 1 doesn't really work. If I recall correctly you have to call setsid, and open a tty as a controlling tty, you can't call setsid as pid 1. The hack that I got to work (for reference, I'm using this for raw kernel testing
2013 Jan 06
0
[LLVMdev] FileCheck + Ninja coloured output
Nope. An easy solution (both here and for clang) is for ninja to set an environment variable (`NINJA_ISATTY`?), and add some magic to LLVM's "isatty" to return true if it sees it. (for matters of correctness, it would actually be best if ninja sets the environment variable only when *it's* stdout/stderr isatty (also taking into account this environment variable), so that everything wor...
2013 Jan 06
2
[LLVMdev] FileCheck + Ninja coloured output
I'm just wondering if anyone's using Ninja (which buffers output from subcommands, such as lit/FileCheck/etc) & has thought about/found a way to force FileCheck to use colour in spite of Ninja's buffering. Thanks, - David
2014 Jun 11
3
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
H. Peter Anvin dixit: >But is that really a tty, then? I also understand that virtio console Hm. Both eglibc and dietlibc return true for isatty on it. >doesn't support termios, which makes this an ugly bifurcation. All of Let me test that? quick? hah not really (CONFIG_VIRTIO_CONSOLE=m)? ok luckily Ubuntu?s linux-image-3.15.0-5-generic is installable on Debian stable and has CONFIG_VIRTIO_CONSOLE=y? but no reiserfs module? gah? o...
2013 Jan 11
1
[LLVMdev] FileCheck + Ninja coloured output
...oth Ninja and lit to resolve this issue - but everyone should at least be a little invested in fixing lit). On Sun, Jan 6, 2013 at 12:18 AM, Sean Silva <silvas at purdue.edu> wrote: > Nope. An easy solution (both here and for clang) is for ninja to set > an environment variable (`NINJA_ISATTY`?), and add some magic to > LLVM's "isatty" to return true if it sees it. I'm a little unsure what you mean by "LLVM's 'isatty'" - isn't that just a system call LLVM would be making? (I suppose we probably have a wrapper somewhere to handle platform-s...
2005 Jul 01
1
[LLVMdev] Including flex/bison output in cvs
...re build changes required though and may be > incompatibilities between unix bison and windows bison. If these were > worked out and solved, I would like to see this happen :) In my experience the only difference between recent bison versions on unix vs win32 is the inclusion of unistd (for isatty()). This is easily solved by adding a dummy unistd.h header which either defines isatty as a macro which always evaluates to zero, or actually implementing the function in a separate source file for win32. The first option would be preferred since the only required change would be an added include...
2018 Sep 12
1
Bug 17432 in readLines with R >= 3.5.0 still a problem
...the input and not read lines until the buffer is exceeded or StdIn is closed by the sending process. This prevents interactive communication between a calling process and a child R process. >From a quick look at the source code, it looks like the bug is caused by only disabling buffering when isatty() returns true for a file descriptor (connections.c). This fixes the original bug when the script is run in a terminal, but doesn't help for pipes, which will return false for isatty(). An example R script and python script are provided to demonstrate the problem: R script (example.r): ======...
2019 Sep 18
2
[PATCH] build: remove unused gnulib modules
...Among directly and indirectly modules used previous (and now no more), they are: cycle-check dev-ino dup3 dup3-tests fcntl-safer fcntl-safer-tests filevercmp filevercmp-tests fts getaddrinfo getaddrinfo-tests hostent i-ring i-ring-tests inet_ntop inet_ntop-tests isatty isatty-tests openat-safer openat-safer-tests opendirat ptsname_r ptsname_r-tests servent ttyname_r ttyname_r-tests Some of the removed modules are still used pulled indirectly as dependency of other modules. There should be no behaviour change on recent Linux distros, although o...
2013 Jul 31
3
[Bug 2135] New: Solaris: race condition in channel forwarding when connect() returns EINPROGRESS
...ailed, it places the error into pending socket error, where it is later pulled up by select()/poll(). However OpenSSH does a bunch of other stuff between connect() and select(). In particular, it calls channels.c:channel_register_fds. And the Portable OpenSSH (not "pure" OpenSSH) invokes isatty() here. On Solaris, isatty() invokes underlaying ioctl() which gets and clears the pending socket error. Therefore on Solaris, there is a race condition when the following happens: - OpenSSH invokes connect() which returns EINPROGRESS - connection attempt outcome is known after a while and is plac...