SCCS-vsn: bin/csh/csh.c 4.2
SCCS-vsn: bin/csh/glob.c 4.2
SCCS-vsn: bin/csh/proc.c 4.3
-static char *sccsid = "@(#)csh.c 4.1 %G%";
+static char *sccsid = "@(#)csh.c 4.2 %G%";
#include "sh.h"
#include <sys/ioctl.h>
#include "sh.h"
#include <sys/ioctl.h>
* gets a chance to make the shell go away.
*/
pintr()
* gets a chance to make the shell go away.
*/
pintr()
+{
+ pintr1(1);
+}
+
+pintr1(wantnl)
+ bool wantnl;
if (v = gargv)
gargv = 0, blkfree(v);
reset();
if (v = gargv)
gargv = 0, blkfree(v);
reset();
+ } else if (intty && wantnl)
printf("\n"); /* Some like this, others don't */
error(NOSTR);
}
printf("\n"); /* Some like this, others don't */
error(NOSTR);
}
-static char *sccsid = "@(#)glob.c 4.1 %G%";
+static char *sccsid = "@(#)glob.c 4.2 %G%";
#ifdef GDEBUG
printf("acollect done\n");
#endif
#ifdef GDEBUG
printf("acollect done\n");
#endif
+ } else if (noglob || eq(as, "{") || eq(as, "{}")) {
-static char *sccsid = "@(#)proc.c 4.2 %G%";
+static char *sccsid = "@(#)proc.c 4.3 %G%";
#include "sh.h"
#include "sh.dir.h"
#include "sh.h"
#include "sh.dir.h"
jobflags & PAEXITED ||
#endif
!eq(dcwd->di_name, fp->p_cwd->di_name)) {
jobflags & PAEXITED ||
#endif
!eq(dcwd->di_name, fp->p_cwd->di_name)) {
- if (jobflags & PSTOPPED)
- printf("\n");
- pprint(fp, AREASON|SHELLDIR);
+ ; /* print in pjwait */
} else if ((jobflags & (PTIME|PSTOPPED)) == PTIME)
ptprint(fp);
} else {
} else if ((jobflags & (PTIME|PSTOPPED)) == PTIME)
ptprint(fp);
} else {
sigrelse(SIGCHLD);
if (tpgrp > 0)
ioctl(FSHTTY, TIOCSPGRP, &tpgrp); /* get tty back */
sigrelse(SIGCHLD);
if (tpgrp > 0)
ioctl(FSHTTY, TIOCSPGRP, &tpgrp); /* get tty back */
- if (jobflags & PSTOPPED)
- return;
- if ((jobflags&PINTERRUPTED) && setintr &&
+ if ((jobflags&(PINTERRUPTED|PSTOPPED)) && setintr &&
(!gointr || !eq(gointr, "-"))) {
(!gointr || !eq(gointr, "-"))) {
+ if ((jobflags & PSTOPPED) == 0)
+ pflush(pp);
+ else {
+ printf("\n");
+ pprint(pp, AREASON|SHELLDIR);
+ }
+ pintr1(0);
/*NOTREACHED*/
}
reason = 0;
/*NOTREACHED*/
}
reason = 0;