5

Linux supports job control, i.e. you can start a process in the background, or make a foreground process run in the background, or make a background process run in the foreground, etc.

Did any V7 or earlier version of UNIX support such job control?

  • BSD-style job control, the kind you're thinking of that uses CTRL-Z, fg and bg, was first implemented in BSD 4.1. There was also a competing System V kind of job control called shell layers that first appeared in System V R2. – Ross Ridge May 18 '17 at 16:55
7

UNIX V6 allows starting processes in the background with the ampersand character:

  Use, duplication or disclosure is subject to
  restrictions stated in Contract with Western
  Electric Company, Inc.
  # LS -L /BIN &
3
# TOTAL 392
-RWXRWXR-X  1 BIN      1514 JUL 18 09:33 AR
-RWXRWXR-X  1 BIN      5748 JUL 18 08:59 AS
-RWXRWXR-X  1 BIN      8780 JUL 18 09:33 BAS
-RWXRWXR-X  1 BIN       152 JUL 18 09:35 CAT
-RWXRWXR-X  1 BIN      7186 JUL 18 09:35 CC
...

Note the process number (3) and the prompt before the output from the background process starts. SIGSTOP/SIGCONT signals haven't been invented yet (see the switch statement in psig() function around the middle of the file), so it isn't possible to stop the background process without killing it. Also there is no way to "background" an already running process or to bring a background process to foreground.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.