2

Is there a limit to how many jobs you can have running in the background when using command prompt? I've heard varying answers to this question, but is there a concrete number that is set as the limit?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255

2 Answers2

2

This is defined in each shell's source code for jobs as the size of the job table and presumably it should keep a general resemblance with the resource limit for maximum number of processes of a user.

In bash it's 8192, from jobs.c of bash source code:

#if !MAX_CHILD_MAX
#  define MAX_CHILD_MAX 8192
#endif
heemayl
  • 56,300
0

As foreground/background is entirely a shell thing (it might affect which filehandles are passed to a process, but that can be affected in other ways), such a limit would have to come from your shell. I've never heard of a shell setting a limit, and as far as I can tell, it would require more code for no real gain, so I doubt any shell does, but there are lots of shells I haven't tried and (probably) more I haven't even heard of.