backward compatible processing for "+/pattern"
[unix-history] / usr / src / usr.bin / gcore / gcore.c
index d849145..a8abbec 100644 (file)
@@ -1,6 +1,29 @@
+/*
+ * Copyright (c) 1982 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)gcore.c    4.3 (Berkeley) %G%";
-#endif
+char copyright[] =
+"@(#) Copyright (c) 1982 The Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)gcore.c    5.4 (Berkeley) %G%";
+#endif /* not lint */
 
 /*
  * gcore - get core images of running processes
 
 /*
  * gcore - get core images of running processes
@@ -140,10 +163,8 @@ main(argc, argv)
                        printf("Zombie.\n");
                        continue;
                }
                        printf("Zombie.\n");
                        continue;
                }
-               if (p->p_flag & SWEXIT) {
-                       printf("Process exiting.\n");
-                       continue;
-               }
+               if (p->p_flag & SWEXIT)
+                       printf("Warning: process exiting.\n");
                if (p->p_flag & SSYS) {
                        printf("System process.\n");
                        /* i.e. swapper or pagedaemon */
                if (p->p_flag & SSYS) {
                        printf("System process.\n");
                        /* i.e. swapper or pagedaemon */