fetch is waiting on input on stdin

Matthias Apitz guru at unixarea.de
Sat Jan 20 16:33:35 UTC 2018

I'm still trying to get around or understand this and maybe it's time to
file a bug PR....

The man page of fetch(3), i.e. the used library for this, explains the
usage of some env vars:

FTP_LOGIN=anonymous export FTP_LOGIN
FTP_PASSWORD=guru at sisis.de export FTP_PASSWORD

and if you set this and run:

$ fetch ftp://ftp.muc.de

you will see, that the values of the env vars are used, but only *after*
reading and getting EOF on stdin, i.e. if you run:

$ fetch ftp://ftp.muc.de < /dev/null

it works right away.

How this is supposed to work in automated scripts, like 'make install'?


Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/  📱 +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20180120/b60dcb2d/attachment.sig>

More information about the freebsd-questions mailing list