aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/ash.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f211df83a..3e741d7d2 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -4401,7 +4401,7 @@ set_curjob(struct job *jp, unsigned mode)
4401 } 4401 }
4402} 4402}
4403 4403
4404#if JOBS || JOBS_WIN32 || DEBUG 4404#if JOBS || ENABLE_PLATFORM_MINGW32 || DEBUG
4405static int 4405static int
4406jobno(const struct job *jp) 4406jobno(const struct job *jp)
4407{ 4407{
@@ -5910,6 +5910,10 @@ forkparent(struct job *jp, union node *n, int mode, HANDLE proc)
5910 if (mode == FORK_BG) { 5910 if (mode == FORK_BG) {
5911 backgndpid = pid; /* set $! */ 5911 backgndpid = pid; /* set $! */
5912 set_curjob(jp, CUR_RUNNING); 5912 set_curjob(jp, CUR_RUNNING);
5913#if ENABLE_PLATFORM_MINGW32
5914 if (iflag && jp && jp->nprocs == 0)
5915 fprintf(stderr, "[%d] %"PID_FMT"d\n", jobno(jp), pid);
5916#endif
5913 } 5917 }
5914 if (jp) { 5918 if (jp) {
5915 struct procstat *ps = &jp->ps[jp->nprocs++]; 5919 struct procstat *ps = &jp->ps[jp->nprocs++];