search for: ctty_pgrp

Displaying 4 results from an estimated 4 matches for "ctty_pgrp".

2003 Jan 27
0
[Bug 477] New: progressmeter.c problem requires openbsd-compat/bsd-cray.h change
...Severity: normal Priority: P2 Component: Build system AssignedTo: openssh-unix-dev at mindrot.org 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 &&am...
2002 Feb 06
2
SFTP Status Bar..
...args->list = xrealloc(args->list, args->nalloc * sizeof(char *)); args->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 ? winsi...
2002 Jan 30
1
Quick sftp status indicator.
...02/01/24 21:09:25 1.15 +++ misc.c 2002/01/29 23:16:28 @@ -310,3 +310,133 @@ args->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 assum...
2002 Feb 02
0
Version two of progressbar for scp/sftp
...02/01/24 21:09:25 1.15 +++ misc.c 2002/02/02 21:47:40 @@ -310,3 +310,135 @@ args->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 "...