jobs.c (248349) | jobs.c (248980) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 */ 32 33#ifndef lint 34#if 0 35static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 */ 32 33#ifndef lint 34#if 0 35static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; 36#endif 37#endif /* not lint */ 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 248349 2013-03-15 20:29:31Z jilles $"); | 39__FBSDID("$FreeBSD: head/bin/sh/jobs.c 248980 2013-04-01 17:18:22Z jilles $"); |
40 41#include <sys/ioctl.h> 42#include <sys/param.h> 43#include <sys/resource.h> 44#include <sys/time.h> 45#include <sys/wait.h> 46#include <errno.h> 47#include <fcntl.h> --- 615 unchanged lines hidden (view full) --- 663 /* Relocate `ps' pointers */ 664 for (i = 0; i < njobs; i++) 665 if (jp[i].ps == &jobtab[i].ps0) 666 jp[i].ps = &jp[i].ps0; 667 ckfree(jobtab); 668 jobtab = jp; 669 } 670 jp = jobtab + njobs; | 40 41#include <sys/ioctl.h> 42#include <sys/param.h> 43#include <sys/resource.h> 44#include <sys/time.h> 45#include <sys/wait.h> 46#include <errno.h> 47#include <fcntl.h> --- 615 unchanged lines hidden (view full) --- 663 /* Relocate `ps' pointers */ 664 for (i = 0; i < njobs; i++) 665 if (jp[i].ps == &jobtab[i].ps0) 666 jp[i].ps = &jp[i].ps0; 667 ckfree(jobtab); 668 jobtab = jp; 669 } 670 jp = jobtab + njobs; |
671 for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0); | 671 for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0) 672 ; |
672 INTON; 673 break; 674 } 675 if (jp->used == 0) 676 break; 677 } 678 INTOFF; 679 jp->state = 0; --- 320 unchanged lines hidden (view full) --- 1000 kill(getpid(), SIGINT); 1001#endif 1002 INTON; 1003 return st; 1004} 1005 1006 1007static void | 673 INTON; 674 break; 675 } 676 if (jp->used == 0) 677 break; 678 } 679 INTOFF; 680 jp->state = 0; --- 320 unchanged lines hidden (view full) --- 1001 kill(getpid(), SIGINT); 1002#endif 1003 INTON; 1004 return st; 1005} 1006 1007 1008static void |
1008dummy_handler(int sig) | 1009dummy_handler(int sig __unused) |
1009{ 1010} 1011 1012/* 1013 * Wait for a process to terminate. 1014 */ 1015 1016static pid_t --- 418 unchanged lines hidden --- | 1010{ 1011} 1012 1013/* 1014 * Wait for a process to terminate. 1015 */ 1016 1017static pid_t --- 418 unchanged lines hidden --- |