Displaying 20 results from an estimated 27 matches for "tiocgpgrp".
2014 Jun 11
2
[PATCH] 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).
Reported-by: Dominik George <d.george at tarent.de>
Signed-off-by: Thorsten Glaser <t.glaser at tarent.de>
---
usr/klibc/isatty.c | 5 +...
2014 Jul 09
0
[klibc:master] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
...libc/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 ]
Reported-by: Dominik George <d.geo...
2014 Jun 11
0
[PATCH] isatty(): use TCGETS instead of TIOCGPGRP, like dietlibc does
On 06/11/2014 01:02 AM, Thorsten Glaser wrote:
> 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).
>
> Reported-by: Dominik George <d.george at tarent.de>
> Signed-off-by: Thorsten Glaser <t.glaser at tarent.de>
>...
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
Maciej ?enczykowski dixit:
>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
There is no klibc shell.
>child should
>
>setsid()
>close(2)
>close(1)
>close(0)
>open("/dev/ttyS0", O_RDONLY)
>open("/dev/ttyS0", O_WRONLY|O_NOCTTY)
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
2003 Jan 27
0
[Bug 477] New: progressmeter.c problem requires openbsd-compat/bsd-cray.h change
...ReportedBy: wendyp at cray.com
when foregroundproc() got put into progressmeter.c, the return line got
changed from
#ifdef HAVE_TCGETPGRP
return ((ctty_pgrp = tcgetpgrp(STDOUT_FILENO)) != -1 &&
ctty_pgrp == pgrp);
#else
return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
ctty_pgrp == pgrp));
#endif
to
return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
ctty_pgrp == pgrp));
and the crays stopped being able to compile because TIOCGPGRP isn't
set on them.
i'...
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
2002 May 01
3
scp 3.1p1 problem on Solaris
...he following
output repeats over and over at some stage:
...
Received signal #14, SIGALRM, in write() [caught]
write(7, " AF8 d >FF z y 9FF02 z x".., 8192) = 5120
ioctl(1, TIOCGSID, 0xFFBEDE34) = 0
getsid(0) = 508
ioctl(1, TIOCGPGRP, 0xFFBEDE9C) = 0
ioctl(1, TIOCGWINSZ, 0xFFBEDEF8) = 0
write(1, "\r p h p - 4 . 2 . 0 . t".., 80) = 80
sigaction(SIGALRM, 0xFFBEDFF8, 0xFFBEE078) = 0
alarm(1) = 0
setcontext(0xFFBEE1E8)
...
Has anyone seens t...
2000 Sep 02
2
[PATCH]: Cygwin port of 2.2.0p1
...CYGWIN is set.
- loginrec.c: Disable check for uid 0 when HAVE_CYGWIN is set.
- pty.c: Check for USE_VHANGUP instead of HAVE_VHANGUP.
Don't call I_PUSH ioctl's under Cygwin.
- readconf.c: Disable check for uid 0 when HAVE_CYGWIN is set.
- scp.c: Call tcgetpgrp() instead of ioctl(..., TIOCGPGRP) to get the
controlling terminal when HAVE_CYGWIN is set.
- session.c: Close xauthfiles immediatly to avoid implicit file
lockings on Windows NT systems. Changes in environment setting.
Disable check for uid 0 when HAVE_CYGWIN is set. Don't call xauth
with `.../unix' syntax und...
2000 Jul 18
5
scp not shutting down in 2.1.1p4
Hi!
as I just noted, after scp the connection does not shut down properly.
When I do a "scp file targethost:path", on targethost a "sshd" process is
left running. I do use
--with-default-path="/usr/local/openssh/bin:/usr/bin:/usr/local/bin"
to assure, that the corrensponding openssh-scp is used.
It also seems, that normal sessions are not always closed properly.
2002 Feb 06
2
SFTP Status Bar..
...;list[args->num++] = xstrdup(buf);
args->list[args->num] = NULL;
+}
+
+/* scp/sftp progression meter (from src/usr.bin/ftp/util.c) */
+static int
+foregroundproc(void)
+{
+ static pid_t pgrp = -1;
+ int ctty_pgrp;
+
+ if (pgrp == -1)
+ pgrp = getpgrp();
+
+ return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
+ ctty_pgrp == pgrp));
+}
+
+int
+getttywidth(void)
+{
+ struct winsize winsize;
+
+ if (ioctl(fileno(stdout), TIOCGWINSZ, &winsize) != -1)
+ return (winsize.ws_col ? winsize.ws_col : 80);
+ else
+ return (80);
+}
+
+void
+progressmeter(off_t statbytes, off...
2003 Feb 18
0
progressmeter.c fails to build on Cygwin
...o put it
into some other file since it's probably needed for other systems, too.
Does anybody know of other systems? Otherwise I'll send a patch which
defines it only for Cygwin.
But especially, I don't see a reason why the good old foregroundproc()
function unconditionally uses ioctl(TIOCGPGRP) now instead of testing for
HAVE_TCGETPGRP as before, when the function was in scp.c. Worse, the
test for tcgetpgrp has been removed from configure.ac. This definitely
is a showstopper for Cygwin. I reverted the patch in my local sandbox
already and it builds again. I'd like to know if I sh...
2003 Feb 19
0
[Bug 499] New: progressmeter.c doesn't build (at least) on Cygwin
...Severity: critical
Priority: P2
Component: Build system
AssignedTo: openssh-unix-dev at mindrot.org
ReportedBy: vinschen at redhat.com
Three bugs:
- libgen.h doesn't exist on all platforms.
- basename() doesn't exist on all platforms.
- ioctl(TIOCGPGRP) doesn't exist on all platforms. This is a
reintroduced problem since there was another method used on
other platforms (calling tcgetpgrp()) when that code was
still in scp.c
The attached patch solves all three problems, the basename()
problem only for Cygwin, the other problems general...
2002 Jan 30
1
Quick sftp status indicator.
...;list[args->num++] = xstrdup(buf);
args->list[args->num] = NULL;
}
+
+/* scp/sftp progression meter (from src/usr.bin/ftp/util.c) */
+static int
+foregroundproc(void)
+{
+ static pid_t pgrp = -1;
+ int ctty_pgrp;
+
+ if (pgrp == -1)
+ pgrp = getpgrp();
+
+ return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
+ ctty_pgrp == pgrp));
+}
+
+void
+progressmeter(int flag, off_t statbytes, off_t totalbytes, char *curfile)
+{
+#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */
+ static const char prefixes[] = " KMGTP";
+ stati...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...;list[args->num++] = xstrdup(buf);
args->list[args->num] = NULL;
}
+
+/* scp/sftp progression meter (from src/usr.bin/ftp/util.c) */
+static int
+foregroundproc(void)
+{
+ static pid_t pgrp = -1;
+ int ctty_pgrp;
+
+ if (pgrp == -1)
+ pgrp = getpgrp();
+
+ return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
+ ctty_pgrp == pgrp));
+}
+
+void
+progressmeter(off_t statbytes, off_t totalbytes, char *filename)
+{
+#define STALLTIME 5 /* number of seconds before xfer assumed "stalled" */
+ static const char prefixes[] = " KMGTP";
+ static char *p...
2000 Aug 08
1
[PATCH] Updated patch to Cygwin port of 2.1.1p4
...set.
- loginrec.c: Disable check for uid 0 when HAVE_CYGWIN is set.
- pty.c: Disable HAVE_VHANGUP explicitely if HAVE_CYGWIN is set.
Don't call I_PUSH ioctl's under Cygwin.
- readconf.c: Disable check for uid 0 when HAVE_CYGWIN is set.
- scp.c: Call tcgetpgrp() instead of ioctl(..., TIOCGPGRP) to get the
controlling terminal when HAVE_CYGWIN is set.
- session.c: Close xauthfiles immediatly to avoid implicit file
lockings on Windows NT systems. Changes in environment setting.
Disable check for uid 0 when HAVE_CYGWIN is set. Don't call xauth
with `.../unix' syntax und...
2006 May 03
2
Rsync error on client end: unexpected tag 3 [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(843) [sender]
...rsync client). I apologise, I cannot say whether it was 2.6.8 or 2.6.7. I'm pretty sure it's 2.6.8.
Here is the interesting section:
------------------------------------------------------------------------------------------
5503 gettimeofday({1146614119, 369460}, NULL) = 0
5503 ioctl(1, TIOCGPGRP, [48]) = -1 ENOTTY (Inappropriate ioctl for device)
5503 write(1, " 583 100% 0.94kB/s "..., 41) = 41
5503 select(4, NULL, [3], NULL, {60, 0}) = 1 (out [3], left {60, 0})
5503 write(3, "\333\323\361\276[\177\376\33\3\34\302\4\235.\237\301", 16) = 16
5503...
2000 Aug 01
2
Port of OpenSSH-2.1.1p4 to Cygwin
...c: Add O_BINARY to open calls.
- includes.h: Use HAVE_CYGWIN to care for include files. Add a define
for O_BINARY.
- loginrec.c: Add O_BINARY to open calls.
- pty.c: Don't call I_PUSH ioctl's under Cygwin.
- scp.c: Add O_BINARY to open calls. Call tcgetpgrp() instead of
ioctl(..., TIOCGPGRP) to get the controlling terminal.
- session.c: Close xauthfiles immediatly to avoid implicit file
lockings on Windows NT systems. Changes in environment setting.
Disable check for uid 0. Don't call xauth with `.../unix' syntax
under Cygwin.
- ssh.c: Disable setrlimit call under C...
2000 Jun 07
1
[PATCH]: Port of openssh-2.1.0p3 to Cygwin environment
...PTOS_LOWDELAY and IPTOS_THROUGHPUT are defined in Cygwin
but result in error on W2K.
- [pty.c] pushing streams modules isn't functional on Windows.
- [rsa.c] Don't call seed_rng() in Cygwin to avoid race condition in
daemon mode.
- [scp.c] Call `tcgetpgrp()' instead of `ioctl(, TIOCGPGRP,) in Cygwin.
- [session.c] Rearrange environment handling for woring under Windows.
Close xauthfile imediately to avoid permission problems under
Windows.
Don't send the `$DISPLAY/unix' stuff to the Cygwin xauth program.
- [ssh.c] Try more variations of the own name in Cygwin.
- [s...