Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 2019 20:47:31 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r345556 - stable/11/bin/sh
Message-ID:  <201903262047.x2QKlVVi058407@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Tue Mar 26 20:47:30 2019
New Revision: 345556
URL: https://svnweb.freebsd.org/changeset/base/345556

Log:
  MFC r327475: sh: Move various structs from jobs.h to jobs.c
  
  These implementation details of jobs.c need not be exposed.
  
  PR:		224270

Modified:
  stable/11/bin/sh/jobs.c
  stable/11/bin/sh/jobs.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/bin/sh/jobs.c
==============================================================================
--- stable/11/bin/sh/jobs.c	Tue Mar 26 20:44:02 2019	(r345555)
+++ stable/11/bin/sh/jobs.c	Tue Mar 26 20:47:30 2019	(r345556)
@@ -75,6 +75,42 @@ __FBSDID("$FreeBSD$");
 #include "builtins.h"
 
 
+/*
+ * A job structure contains information about a job.  A job is either a
+ * single process or a set of processes contained in a pipeline.  In the
+ * latter case, pidlist will be non-NULL, and will point to a -1 terminated
+ * array of pids.
+ */
+
+struct procstat {
+	pid_t pid;		/* process id */
+	int status;		/* status flags (defined above) */
+	char *cmd;		/* text of command being run */
+};
+
+
+/* states */
+#define JOBSTOPPED 1		/* all procs are stopped */
+#define JOBDONE 2		/* all procs are completed */
+
+
+struct job {
+	struct procstat ps0;	/* status of process */
+	struct procstat *ps;	/* status or processes when more than one */
+	short nprocs;		/* number of processes */
+	pid_t pgrp;		/* process group of this job */
+	char state;		/* true if job is finished */
+	char used;		/* true if this entry is in used */
+	char changed;		/* true if status has changed */
+	char foreground;	/* true if running in the foreground */
+	char remembered;	/* true if $! referenced */
+#if JOBS
+	char jobctl;		/* job running under job control */
+	struct job *next;	/* job used after this one */
+#endif
+};
+
+
 static struct job *jobtab;	/* array of jobs */
 static int njobs;		/* size of array */
 static pid_t backgndpid = -1;	/* pid of last background process */

Modified: stable/11/bin/sh/jobs.h
==============================================================================
--- stable/11/bin/sh/jobs.h	Tue Mar 26 20:44:02 2019	(r345555)
+++ stable/11/bin/sh/jobs.h	Tue Mar 26 20:47:30 2019	(r345556)
@@ -40,40 +40,7 @@
 
 #include <signal.h>		/* for sig_atomic_t */
 
-/*
- * A job structure contains information about a job.  A job is either a
- * single process or a set of processes contained in a pipeline.  In the
- * latter case, pidlist will be non-NULL, and will point to a -1 terminated
- * array of pids.
- */
-
-struct procstat {
-	pid_t pid;		/* process id */
-	int status;		/* status flags (defined above) */
-	char *cmd;		/* text of command being run */
-};
-
-
-/* states */
-#define JOBSTOPPED 1		/* all procs are stopped */
-#define JOBDONE 2		/* all procs are completed */
-
-
-struct job {
-	struct procstat ps0;	/* status of process */
-	struct procstat *ps;	/* status or processes when more than one */
-	short nprocs;		/* number of processes */
-	pid_t pgrp;		/* process group of this job */
-	char state;		/* true if job is finished */
-	char used;		/* true if this entry is in used */
-	char changed;		/* true if status has changed */
-	char foreground;	/* true if running in the foreground */
-	char remembered;	/* true if $! referenced */
-#if JOBS
-	char jobctl;		/* job running under job control */
-	struct job *next;	/* job used after this one */
-#endif
-};
+struct job;
 
 enum {
 	SHOWJOBS_DEFAULT,	/* job number, status, command */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903262047.x2QKlVVi058407>