fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
a0d8d27f4
master
1#RUN: env fth=%fish_test_helper fish=%fish %fish %s 2#REQUIRES: command -v %fish_test_helper 3 4# Ensure job control works in non-interactive environments. 5 6status job-control full 7command echo hello 8#CHECK: hello 9 10$fth print_pgrp| read first 11$fth print_pgrp| read second 12test $first -ne $second 13and echo "pgroups differed, meaning job control worked" 14or echo "pgroups were the same, job control did not work" 15#CHECK: pgroups differed, meaning job control worked 16 17# fish ignores SIGTTIN and so may transfer the tty even if it 18# doesn't own the tty. Ensure that doesn't happen. 19$fish -c'status job-control full ; $fth report_foreground' & 20wait 21#CHECKERR: background 22 23$fish -c'sleep .2 & bg %1' 24#CHECKERR: bg: Can't put job 1, 'sleep .2 &' to background because it is not under job control