10
8
I have trouble understanding my situation and Google was not very helpful so far.
I started a bash background job:
ping google.com &
First I get the process ID, than Bash prints stdout to screen.
user@host:~$ ping google.com &
[1] 14004
user@host:~$ PING google.com (173.194.44.66) 56(84) bytes of data.
64 bytes from ham02s14-in-f2.1e100.net (173.194.44.66): icmp_seq=1 ttl=54 time=26.3 ms
64 bytes from ham02s14-in-f2.1e100.net (173.194.44.66): icmp_seq=2 ttl=54 time=27.4 ms
64 bytes from ham02s14-in-f2.1e100.net (173.194.44.66): icmp_seq=3 ttl=54 time=29.2 ms
...
This contradicts everything I read today. I have a standard Debian Jessie setup running GNU bash, version 4.3.30(1)-release (x86_64-pc-linux-gnu).
Can anyone explain this to me? Thanks.
On MacOSX this does not work. – Ogier Schelvis – 2018-03-13T09:33:08.117
@OgierSchelvis: Of course it does. – Nick Matteo – 2018-11-27T23:27:28.137
Is there a way to reattach
stdin
in this case? – alecov – 2019-01-16T04:51:11.893