[6554] in Athena Bugs

home help back first fref pref prev next nref lref last post

vax 7.2D: tcsh "jobs" built-in.

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Thu Dec 6 15:19:20 1990

From: vanharen@ATHENA.MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Thu, 06 Dec 90 15:19:02 EST

System name:		fries
Type and version:	CVAXSTAR 7.2D (1 update(s) to same version)
Display type:		SM

What were you trying to do?
	List my jobs.

What's wrong:
	It skipped a newline at the end of one of the jobs when I did
	"jobs -l" ...  notice that the 2nd job below does not have a
	newline	at the end.

=== Example ===================================================================
fries /tmp % jobs
[1]    Stopped              ( setenv KRBTKFILE /tmp/root; kinit vanharen.root; rlogin noc -l root )
[2]  - Stopped              ( setenv KRBTKFILE /tmp/root; rlogin m11-116-p -l root )
[3]  + Stopped              su
[4]    Running              xclock

fries /tmp % jobs -l
[1]     1658 Stopped              ( setenv KRBTKFILE /tmp/root; kinit vanharen.root; rlogin noc -l root ) (wd: /usr/athena/lib/gnuemacs/lisp)
[2]  -  1664 Stopped              ( setenv KRBTKFILE /tmp/root; rlogin m11-116-p -l root ) (wd: /usr/athena/lib/gnuemacs/lisp)[3]  +  1671 Stopped
su
[4]     1672 Running              xclock

===============================================================================

	The real problem is that the line is characters long, and the
	way tcsh deals with printing out job info is really sick.  A
	simple workaround is attached, though I am working on a better
	fix.

What should have happened:
	It should have a newline at the end of every line.  And, the
	code for tcsh should not be so gross.

Workaround:
	Make the buffer "linbuf" bigger:

===============================================================================
*** /tmp/sh.print.c     Thu Dec  6 15:13:13 1990
--- /source/athena/bin/tcsh/sh.print.c  Wed Nov 18 00:33:52 1987
***************
*** 53,59 ****
        printf("%d%d", i / 10, i % 10);
  }

! char  linbuf[1024];
  char  *linp = linbuf;

  putchar(c)
--- 53,59 ----
        printf("%d%d", i / 10, i % 10);
  }

! char  linbuf[128];
  char  *linp = linbuf;

  putchar(c)
===============================================================================



home help back first fref pref prev next nref lref last post