[darcs-users] pure haskell darcs

Juliusz Chroboczek jch at pps.jussieu.fr
Fri Feb 11 16:41:08 UTC 2005


>> >    c:\> cat somefile | ssh me at myhost "cat > remotefile"

>> Yes, it's potentially unsafe.  It depends on how your shell does
>> pipes, and how your ssh deals with pipes on standard input.  Of
>> course, you don't know what your shell is or what your implementation
>> of ssh is.

> What I remember from early DOS days is that pipes are implemented by
> first spooling the first program's output into a temporary file (in
> $TEMP) and letting the first program finish.

Yes, this is the implementation of execution pipelines introduced in
Mini Unix (Ritchie, 1977) and inherited by MS-DOS.

Execution pipelines however, are implemented by the shell.  As Windows
has proper pipes (since Windows NT 3.1 and Windows 95), it's anyone's
guess how a given Windows shell implements execution pipelines.

> I don't see how this one could break.

- there is no such command as cat in the local PATH;
- somefile contains spaces;
- remotefile contains spaces;
- the local shell does not implement execution pipelines;
- the remote shell does not implement redirection;
- the ssh implementation does something stupid when stdin is not a terminal;
- ...

                                        Juliusz





More information about the darcs-users mailing list