Fails to read from stdin if the process producing data is slow to start
Bug #230649 reported by
James Westby
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pastebinit |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi,
pastebinit doesn't work when trying to read from stdin and
the process producing the data is slow to start, e.g.
(sleep 2; echo a) | pastebinit
tells you that you need to provide arguments.
This could be fixed by checking the arguments first. If there is
no filename provided then read from stdin, and so wait for it.
This would also allow you to just run pastebinit and type.
As it accepts filenames without -i now there should be no confusion
caused by it "hanging" when you expect it read a file as happens
with "patch patch_filename".
Thanks for the tool though, it is very useful.
Thanks,
James
Changed in pastebinit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
James Westby wrote:
> Public bug reported:
>
> Hi,
>
> pastebinit doesn't work when trying to read from stdin and
> the process producing the data is slow to start, e.g.
>
> (sleep 2; echo a) | pastebinit
>
> tells you that you need to provide arguments.
>
> This could be fixed by checking the arguments first. If there is
> no filename provided then read from stdin, and so wait for it.
>
> This would also allow you to just run pastebinit and type.
>
> As it accepts filenames without -i now there should be no confusion
> caused by it "hanging" when you expect it read a file as happens
> with "patch patch_filename".
>
> Thanks for the tool though, it is very useful.
>
> Thanks,
>
> James
>
> ** Affects: pastebinit
> Importance: Undecided
> Status: New
>
Hi,
Thanks for reporting this bug, I'm not really sure of why sending data
trough the pipe doesn't work in your case.
I gave it a quick try and successfully reproduced the bug although I
have no idea of what's going wrong ...
Stéphane
-----BEGIN PGP SIGNATURE-----
fqkjBhuwRAgl3AJ 4u8aL5YWy1a9Eyd 8djcvGdtoB4HwCf URA8 HlYxXvTQ=
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFILDN1jxy
gWPQ1MhM35xJ6wQ
=Z6nQ
-----END PGP SIGNATURE-----