Commit f815f209 authored by Don Lipari's avatar Don Lipari
Browse files

Lipari: Added an extra sleep to test6.13 to make it pass consistently.

Gerrit Renker:  I found an easier test: after making sure that stdin is not
 redirected, check whether there is a non-negative terminal process group (it
 is -1 if there is no controlling terminal).

 Also, I think that the heuristic "only interactive if from login shell" is
 needlessly complicated/obscure. Most (if not all) shells that support job
 control place processes in their own process group (pid == pgrp): it now uses
 this as indicator of interactive mode.

The following tests now pass:

  salloc &			# from login shell and from nested shell
  salloc --no-shell&		# ok
  salloc /bin/date&		# wants to be placed into the foreground
  salloc /bin/date </dev/null &	# ok

  setsid salloc	 		# complains there is no controlling terminal
  setsid salloc --no-shell&	# ok
parent 2ed250dd
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment