3 ms·
This only works because you're allowing backgrounded processes to write to the terminal (stty -tostop). Try stty tostop kaz@sun-go:~/txr$ stty -tostop kaz
by kazinator 4y ago
This only works because you're allowing backgrounded processes to write to the terminal (stty -tostop).
Try stty tostop
kaz@sun-go:~/txr$ stty -tostop
kaz@sun-go:~/txr$ dd if=/dev/zero of=/dev/null &
[1] 14604
kaz@sun-go:~/txr$ kill -USR1 %1
kaz@sun-go:~/txr$ 1142200+0 records in
1142200+0 records out
584806400 bytes (585 MB, 558 MiB) copied, 2.62053 s, 223 MB/s
kaz@sun-go:~/txr$ kill -USR1 %1
2054884+0 records in
2054883+0 records out
1052100096 bytes (1.1 GB, 1003 MiB) copied, 4.70066 s, 224 MB/s
kaz@sun-go:~/txr$
kaz@sun-go:~/txr$ stty tostop
kaz@sun-go:~/txr$ kill -USR1 %1
kaz@sun-go:~/txr$ kill -USR1 %1
[1]+ Stopped dd if=/dev/zero of=/dev/null
kaz@sun-go:~/txr$ kill -USR1 %1
[1]+ Stopped dd if=/dev/zero of=/dev/null
kaz@sun-go:~/txr$
- mat_epice 4y agoI just backgrounded the process for pedagogical purposes. Usually a process I'm concerned about is running in the foreground anyway, so I signal the process from another terminal.