summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.h
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2006-10-07 16:51:16 +0000
committerstefanf <stefanf@FreeBSD.org>2006-10-07 16:51:16 +0000
commit7819e9ab69305b9516d6f50f05b04633464eebf2 (patch)
tree33f628da3a1045ce4d4696ace27d45c9bf566174 /bin/sh/jobs.h
parentd315543cc46a8d7ef4390e4a3ca07b7985bb705f (diff)
downloadFreeBSD-src-7819e9ab69305b9516d6f50f05b04633464eebf2.zip
FreeBSD-src-7819e9ab69305b9516d6f50f05b04633464eebf2.tar.gz
Add the POSIX option -p to the jobs builtin command. It prints the PID of the
process leader for each job. Now the last specified option for the output format (-l, -p or -s) wins, previously -s trumped -l. PR: 99926 Submitted by: Ed Schouten and novel (patches modified by me)
Diffstat (limited to 'bin/sh/jobs.h')
-rw-r--r--bin/sh/jobs.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/sh/jobs.h b/bin/sh/jobs.h
index 54894e9..c75c353 100644
--- a/bin/sh/jobs.h
+++ b/bin/sh/jobs.h
@@ -74,6 +74,13 @@ struct job {
#endif
};
+enum {
+ SHOWJOBS_DEFAULT, /* job number, status, command */
+ SHOWJOBS_VERBOSE, /* job number, PID, status, command */
+ SHOWJOBS_PIDS, /* PID only */
+ SHOWJOBS_PGIDS /* PID of the group leader only */
+};
+
extern pid_t backgndpid; /* pid of last background process */
extern int job_warning; /* user was warned about stopped jobs */
extern int in_waitcmd; /* are we in waitcmd()? */
@@ -84,7 +91,7 @@ void setjobctl(int);
int fgcmd(int, char **);
int bgcmd(int, char **);
int jobscmd(int, char **);
-void showjobs(int, int, int);
+void showjobs(int, int);
int waitcmd(int, char **);
int jobidcmd(int, char **);
struct job *makejob(union node *, int);
OpenPOWER on IntegriCloud